Skip to content

Commit

Permalink
treewide: remove editor modelines and cruft
Browse files Browse the repository at this point in the history
The section "19) Editor modelines and other cruft" in
Documentation/process/coding-style.rst clearly says, "Do not include any
of these in source files."

I recently receive a patch to explicitly add a new one.

Let's do treewide cleanups, otherwise some people follow the existing code
and attempt to upstream their favoriate editor setups.

It is even nicer if scripts/checkpatch.pl can check it.

If we like to impose coding style in an editor-independent manner, I think
editorconfig (patch [1]) is a saner solution.

[1] https://lore.kernel.org/lkml/[email protected]/

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Miguel Ojeda <[email protected]>	[auxdisplay]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
masahir0y authored and torvalds committed May 7, 2021
1 parent 7497835 commit fa60ce2
Show file tree
Hide file tree
Showing 157 changed files with 110 additions and 627 deletions.
7 changes: 0 additions & 7 deletions arch/m68k/atari/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,3 @@ int atari_tt_hwclk( int op, struct rtc_time *t )

return( 0 );
}

/*
* Local variables:
* c-indent-level: 4
* tab-width: 8
* End:
*/
1 change: 0 additions & 1 deletion arch/parisc/include/asm/pdc_chassis.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,3 @@ void parisc_pdc_chassis_init(void);
PDC_CHASSIS_EOM_SET )

#endif /* _PARISC_PDC_CHASSIS_H */
/* vim: set ts=8 */
7 changes: 0 additions & 7 deletions arch/um/drivers/cow.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,3 @@ extern void cow_sizes(int version, __u64 size, int sectorsize, int align,
int *data_offset_out);

#endif

/*
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
7 changes: 0 additions & 7 deletions drivers/auxdisplay/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1737,10 +1737,3 @@ module_init(panel_init_module);
module_exit(panel_cleanup_module);
MODULE_AUTHOR("Willy Tarreau");
MODULE_LICENSE("GPL");

/*
* Local variables:
* c-indent-level: 4
* tab-width: 8
* End:
*/
1 change: 0 additions & 1 deletion drivers/gpu/drm/qxl/qxl_drv.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* vim: set ts=8 sw=8 tw=78 ai noexpandtab */
/* qxl_drv.c -- QXL driver -*- linux-c -*-
*
* Copyright 2011 Red Hat, Inc.
Expand Down
3 changes: 0 additions & 3 deletions drivers/media/usb/pwc/pwc-uncompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
Please send bug reports and support requests to <[email protected]>.
The decompression routines have been implemented by reverse-engineering the
Nemosoft binary pwcx module. Caveat emptor.
vim: set ts=8:
*/

#include <asm/current.h>
Expand Down
8 changes: 0 additions & 8 deletions drivers/net/ethernet/adaptec/starfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -2070,11 +2070,3 @@ static void __exit starfire_cleanup (void)

module_init(starfire_init);
module_exit(starfire_cleanup);


/*
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* End:
*/
8 changes: 0 additions & 8 deletions drivers/net/ethernet/amd/atarilance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1156,11 +1156,3 @@ static void __exit atarilance_module_exit(void)
module_init(atarilance_module_init);
module_exit(atarilance_module_exit);
#endif /* MODULE */


/*
* Local variables:
* c-indent-level: 4
* tab-width: 4
* End:
*/
7 changes: 0 additions & 7 deletions drivers/net/ethernet/amd/pcnet32.c
Original file line number Diff line number Diff line change
Expand Up @@ -3029,10 +3029,3 @@ static void __exit pcnet32_cleanup_module(void)

module_init(pcnet32_init_module);
module_exit(pcnet32_cleanup_module);

/*
* Local variables:
* c-indent-level: 4
* tab-width: 8
* End:
*/
8 changes: 0 additions & 8 deletions drivers/net/wireless/intersil/orinoco/orinoco_nortel.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,3 @@ static void __exit orinoco_nortel_exit(void)

module_init(orinoco_nortel_init);
module_exit(orinoco_nortel_exit);

/*
* Local variables:
* c-indent-level: 8
* c-basic-offset: 8
* tab-width: 8
* End:
*/
8 changes: 0 additions & 8 deletions drivers/net/wireless/intersil/orinoco/orinoco_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,3 @@ static void __exit orinoco_pci_exit(void)

module_init(orinoco_pci_init);
module_exit(orinoco_pci_exit);

/*
* Local variables:
* c-indent-level: 8
* c-basic-offset: 8
* tab-width: 8
* End:
*/
8 changes: 0 additions & 8 deletions drivers/net/wireless/intersil/orinoco/orinoco_plx.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,3 @@ static void __exit orinoco_plx_exit(void)

module_init(orinoco_plx_init);
module_exit(orinoco_plx_exit);

/*
* Local variables:
* c-indent-level: 8
* c-basic-offset: 8
* tab-width: 8
* End:
*/
8 changes: 0 additions & 8 deletions drivers/net/wireless/intersil/orinoco/orinoco_tmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,3 @@ static void __exit orinoco_tmd_exit(void)

module_init(orinoco_tmd_init);
module_exit(orinoco_tmd_exit);

/*
* Local variables:
* c-indent-level: 8
* c-basic-offset: 8
* tab-width: 8
* End:
*/
12 changes: 0 additions & 12 deletions drivers/parport/parport_ip32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2224,15 +2224,3 @@ MODULE_PARM_DESC(features,
", bit 2: hardware SPP mode"
", bit 3: hardware EPP mode"
", bit 4: hardware ECP mode");

/*--- Inform (X)Emacs about preferred coding style ---------------------*/
/*
* Local Variables:
* mode: c
* c-file-style: "linux"
* indent-tabs-mode: t
* tab-width: 8
* fill-column: 78
* ispell-local-dictionary: "american"
* End:
*/
3 changes: 0 additions & 3 deletions drivers/platform/x86/dell/dell_rbu.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,3 @@ static __exit void dcdrbu_exit(void)

module_exit(dcdrbu_exit);
module_init(dcdrbu_init);

/* vim:noet:ts=8:sw=8
*/
1 change: 0 additions & 1 deletion drivers/scsi/53c700.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8 -*- */

/* NCR (or Symbios) 53c700 and 53c700-66 Driver
*
Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/53c700.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* -*- mode: c; c-basic-offset: 8 -*- */

/* Driver for 53c700 and 53c700-66 chips from NCR and Symbios
*
Expand Down
6 changes: 0 additions & 6 deletions drivers/scsi/ch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,9 +1058,3 @@ static void __exit exit_ch_module(void)

module_init(init_ch_module);
module_exit(exit_ch_module);

/*
* Local variables:
* c-basic-offset: 8
* End:
*/
20 changes: 0 additions & 20 deletions drivers/scsi/ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -7099,23 +7099,3 @@ ips_init_phase2(int index)
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("IBM ServeRAID Adapter Driver " IPS_VER_STRING);
MODULE_VERSION(IPS_VER_STRING);


/*
* Overrides for Emacs so that we almost follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-indent-level: 2
* c-brace-imaginary-offset: 0
* c-brace-offset: -2
* c-argdecl-indent: 2
* c-label-offset: -2
* c-continued-statement-offset: 2
* c-continued-brace-offset: 0
* indent-tabs-mode: nil
* tab-width: 8
* End:
*/
20 changes: 0 additions & 20 deletions drivers/scsi/ips.h
Original file line number Diff line number Diff line change
Expand Up @@ -1211,23 +1211,3 @@ typedef struct {
IPS_COMPAT_TAMPA, \
IPS_COMPAT_KEYWEST \
}


/*
* Overrides for Emacs so that we almost follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-indent-level: 2
* c-brace-imaginary-offset: 0
* c-brace-offset: -2
* c-argdecl-indent: 2
* c-label-offset: -2
* c-continued-statement-offset: 2
* c-continued-brace-offset: 0
* indent-tabs-mode: nil
* tab-width: 8
* End:
*/
1 change: 0 additions & 1 deletion drivers/scsi/lasi700.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8 -*- */

/* PARISC LASI driver for the 53c700 chip
*
Expand Down
2 changes: 0 additions & 2 deletions drivers/scsi/megaraid/mbox_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -781,5 +781,3 @@ typedef struct {
} __attribute__ ((packed)) mbox_sgl32;

#endif // _MRAID_MBOX_DEFS_H_

/* vim: set ts=8 sw=8 tw=78: */
2 changes: 0 additions & 2 deletions drivers/scsi/megaraid/mega_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,5 +282,3 @@ struct mraid_pci_blk {
};

#endif // _MEGA_COMMON_H_

// vim: set ts=8 sw=8 tw=78:
2 changes: 0 additions & 2 deletions drivers/scsi/megaraid/megaraid_mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -4068,5 +4068,3 @@ megaraid_sysfs_show_ldnum(struct device *dev, struct device_attribute *attr, cha
*/
module_init(megaraid_init);
module_exit(megaraid_exit);

/* vim: set ts=8 sw=8 tw=78 ai si: */
2 changes: 0 additions & 2 deletions drivers/scsi/megaraid/megaraid_mbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,3 @@ typedef struct {
#define WROUTDOOR(rdev, value) writel(value, (rdev)->baseaddr + 0x2C)

#endif // _MEGARAID_H_

// vim: set ts=8 sw=8 tw=78:
12 changes: 0 additions & 12 deletions drivers/scsi/qla1280.c
Original file line number Diff line number Diff line change
Expand Up @@ -4403,15 +4403,3 @@ MODULE_FIRMWARE("qlogic/1040.bin");
MODULE_FIRMWARE("qlogic/1280.bin");
MODULE_FIRMWARE("qlogic/12160.bin");
MODULE_VERSION(QLA1280_VERSION);

/*
* Overrides for Emacs so that we almost follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* End:
*/
1 change: 0 additions & 1 deletion drivers/scsi/sni_53c710.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8 -*- */

/* SNI RM driver
*
Expand Down
9 changes: 0 additions & 9 deletions drivers/video/fbdev/matrox/matroxfb_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2608,12 +2608,3 @@ EXPORT_SYMBOL(matroxfb_register_driver);
EXPORT_SYMBOL(matroxfb_unregister_driver);
EXPORT_SYMBOL(matroxfb_wait_for_sync);
EXPORT_SYMBOL(matroxfb_enable_irq);

/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* ---------------------------------------------------------------------------
* Local variables:
* c-basic-offset: 8
* End:
*/

10 changes: 0 additions & 10 deletions drivers/video/fbdev/vga16fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,13 +1451,3 @@ MODULE_DESCRIPTION("Legacy VGA framebuffer device driver");
MODULE_LICENSE("GPL");
module_init(vga16fb_init);
module_exit(vga16fb_exit);


/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* ---------------------------------------------------------------------------
* Local variables:
* c-basic-offset: 8
* End:
*/

4 changes: 1 addition & 3 deletions fs/configfs/configfs_internal.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* -*- mode: c; c-basic-offset:8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
/*
* configfs_internal.h - Internal stuff for configfs
*
* Based on sysfs:
Expand Down
4 changes: 1 addition & 3 deletions fs/configfs/dir.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
/*
* dir.c - Operations for configfs directories.
*
* Based on sysfs:
Expand Down
4 changes: 1 addition & 3 deletions fs/configfs/file.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
/*
* file.c - operations for regular (text) files.
*
* Based on sysfs:
Expand Down
4 changes: 1 addition & 3 deletions fs/configfs/inode.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
/*
* inode.c - basic inode and dentry operations.
*
* Based on sysfs:
Expand Down
4 changes: 1 addition & 3 deletions fs/configfs/item.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
/*
* item.c - library routines for handling generic config items
*
* Based on kobject:
Expand Down
4 changes: 1 addition & 3 deletions fs/configfs/mount.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
/*
* mount.c - operations for initializing and mounting configfs.
*
* Based on sysfs:
Expand Down
4 changes: 1 addition & 3 deletions fs/configfs/symlink.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
/*
* symlink.c - operations for configfs symlinks.
*
* Based on sysfs:
Expand Down
7 changes: 0 additions & 7 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -3004,10 +3004,3 @@ int nfs_permission(struct user_namespace *mnt_userns,
goto out;
}
EXPORT_SYMBOL_GPL(nfs_permission);

/*
* Local variables:
* version-control: t
* kept-new-versions: 5
* End:
*/
6 changes: 0 additions & 6 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10427,9 +10427,3 @@ const struct xattr_handler *nfs4_xattr_handlers[] = {
#endif
NULL
};

/*
* Local variables:
* c-basic-offset: 8
* End:
*/
Loading

0 comments on commit fa60ce2

Please sign in to comment.