From: wuyonggang001@208suo.com
To: davem@davemloft.net
Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] sparc/kernel: Fix syntax error
Date: Wed, 14 Jun 2023 14:16:34 +0800 [thread overview]
Message-ID: <5cc396aff142acbc4ba4b2541a5e4d71@208suo.com> (raw)
In-Reply-To: <20230614061130.64214-1-zhanglibing@cdjrlc.com>
Fix the following checkpatch error:
ERROR: space required before the open parenthesis '('
ERROR: do not initialise statics to 0
ERROR: trailing whitespace
Signed-off-by: Yonggang Wu <wuyonggang001@208suo.com>
---
arch/sparc/kernel/apc.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index ecd05bc0a104..40b9c72ad4d9 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -24,7 +24,7 @@
#include <asm/processor.h>
/* Debugging
- *
+ *
* #define APC_DEBUG_LED
*/
@@ -33,20 +33,20 @@
#define APC_DEVNAME "apc"
static u8 __iomem *regs;
-static int apc_no_idle = 0;
+static int apc_no_idle;
#define apc_readb(offs) (sbus_readb(regs+offs))
#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs))
-/* Specify "apc=noidle" on the kernel command line to
+/* Specify "apc=noidle" on the kernel command line to
* disable APC CPU standby support. Certain prototype
* systems (SPARCstation-Fox) do not play well with APC
- * CPU idle, so disable this if your system has APC and
+ * CPU idle, so disable this if your system has APC and
* crashes randomly.
*/
-static int __init apc_setup(char *str)
+static int __init apc_setup(char *str)
{
- if(!strncmp(str, "noidle", strlen("noidle"))) {
+ if (!strncmp(str, "noidle", strlen("noidle"))) {
apc_no_idle = 1;
return 1;
}
@@ -54,22 +54,22 @@ static int __init apc_setup(char *str)
}
__setup("apc=", apc_setup);
-/*
+/*
* CPU idle callback function
* See .../arch/sparc/kernel/process.c
*/
static void apc_swift_idle(void)
{
#ifdef APC_DEBUG_LED
- set_auxio(0x00, AUXIO_LED);
+ set_auxio(0x00, AUXIO_LED);
#endif
apc_writeb(apc_readb(APC_IDLE_REG) | APC_IDLE_ON, APC_IDLE_REG);
#ifdef APC_DEBUG_LED
- set_auxio(AUXIO_LED, 0x00);
+ set_auxio(AUXIO_LED, 0x00);
#endif
-}
+}
static inline void apc_free(struct platform_device *op)
{
@@ -162,7 +162,7 @@ static int apc_probe(struct platform_device *op)
if (!apc_no_idle)
sparc_idle = apc_swift_idle;
- printk(KERN_INFO "%s: power management initialized%s\n",
+ pr_info("%s: power management initialized%s\n",
APC_DEVNAME, apc_no_idle ? " (CPU idle disabled)" : "");
return 0;
next parent reply other threads:[~2023-06-14 6:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230614061130.64214-1-zhanglibing@cdjrlc.com>
2023-06-14 6:16 ` wuyonggang001 [this message]
2023-06-14 12:11 ` [PATCH] sparc/kernel: Fix syntax error Julian Calaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5cc396aff142acbc4ba4b2541a5e4d71@208suo.com \
--to=wuyonggang001@208suo.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox