Skip to content

Commit

Permalink
Improve consistency of '#error' directive messages
Browse files Browse the repository at this point in the history
Remove the use of contractions and use proper punctuation in #error
directive messages that discourage the direct inclusion of header files.

Link: https://lkml.kernel.org/r/20241105032231.28833-1-natanielfarzan@gmail.com
Signed-off-by: Nataniel Farzan <natanielfarzan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Nataniel Farzan authored and Andrew Morton committed Nov 12, 2024
1 parent adc77b1 commit a7306f3
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion arch/alpha/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define _ALPHA_SPINLOCK_TYPES_H

#ifndef __LINUX_SPINLOCK_TYPES_RAW_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define __ASM_SPINLOCK_TYPES_H

#ifndef __LINUX_SPINLOCK_TYPES_RAW_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

#define TICKET_SHIFT 16
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define __ASM_SPINLOCK_TYPES_H

#if !defined(__LINUX_SPINLOCK_TYPES_RAW_H) && !defined(__ASM_SPINLOCK_H)
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

#include <asm-generic/qspinlock_types.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/hexagon/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define _ASM_SPINLOCK_TYPES_H

#ifndef __LINUX_SPINLOCK_TYPES_RAW_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/simple_spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define _ASM_POWERPC_SIMPLE_SPINLOCK_TYPES_H

#ifndef __LINUX_SPINLOCK_TYPES_RAW_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define _ASM_POWERPC_SPINLOCK_TYPES_H

#ifndef __LINUX_SPINLOCK_TYPES_RAW_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

#ifdef CONFIG_PPC_QUEUED_SPINLOCKS
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define __ASM_SPINLOCK_TYPES_H

#ifndef __LINUX_SPINLOCK_TYPES_RAW_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define __ASM_SH_SPINLOCK_TYPES_H

#ifndef __LINUX_SPINLOCK_TYPES_RAW_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define __ASM_SPINLOCK_TYPES_H

#if !defined(__LINUX_SPINLOCK_TYPES_RAW_H) && !defined(__ASM_SPINLOCK_H)
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

#include <asm-generic/qspinlock_types.h>
Expand Down
2 changes: 1 addition & 1 deletion include/acpi/platform/aclinux.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/* ACPICA external files should not include ACPICA headers directly. */

#if !defined(BUILDING_ACPICA) && !defined(_LINUX_ACPI_H)
#error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead."
#error "Please do not include <acpi/acpi.h> directly, include <linux/acpi.h> instead."
#endif

#endif
Expand Down
2 changes: 1 addition & 1 deletion include/linux/compiler-clang.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_COMPILER_TYPES_H
#error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
#error "Please do not include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
#endif

/* Compiler specific definitions for Clang compiler */
Expand Down
2 changes: 1 addition & 1 deletion include/linux/compiler-gcc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_COMPILER_TYPES_H
#error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
#error "Please do not include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion include/linux/pm_wakeup.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define _LINUX_PM_WAKEUP_H

#ifndef _DEVICE_H_
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

#include <linux/types.h>
Expand Down
2 changes: 1 addition & 1 deletion include/linux/rwlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __LINUX_RWLOCK_H

#ifndef __LINUX_INSIDE_SPINLOCK_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion include/linux/rwlock_api_smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __LINUX_RWLOCK_API_SMP_H

#ifndef __LINUX_SPINLOCK_API_SMP_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion include/linux/spinlock_api_smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __LINUX_SPINLOCK_API_SMP_H

#ifndef __LINUX_INSIDE_SPINLOCK_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion include/linux/spinlock_types_up.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __LINUX_SPINLOCK_TYPES_UP_H

#ifndef __LINUX_SPINLOCK_TYPES_RAW_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion include/linux/spinlock_up.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __LINUX_SPINLOCK_UP_H

#ifndef __LINUX_INSIDE_SPINLOCK_H
# error "please don't include this file directly"
# error "Please do not include this file directly."
#endif

#include <asm/processor.h> /* for cpu_relax() */
Expand Down
2 changes: 1 addition & 1 deletion tools/include/linux/compiler-gcc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _TOOLS_LINUX_COMPILER_H_
#error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
#error "Please do not include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
#endif

/*
Expand Down

0 comments on commit a7306f3

Please sign in to comment.