public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roshan Kumar <roshaen09@gmail.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Roshan Kumar <roshaen09@gmail.com>
Subject: [PATCH] pci: access: fixed coding style issues in access.c
Date: Wed, 10 Sep 2025 18:48:09 +0000	[thread overview]
Message-ID: <20250910184809.392702-1-roshaen09@gmail.com> (raw)

Fixed coding style warnings and errors in drivers/pci/access.c

Signed-off-by: Roshan Kumar <roshaen09@gmail.com>
---
 drivers/pci/access.c | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index b123da16b63b..5ed434d3763d 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -25,16 +25,16 @@ DEFINE_RAW_SPINLOCK(pci_lock);
 #define PCI_dword_BAD (pos & 3)
 
 #ifdef CONFIG_PCI_LOCKLESS_CONFIG
-# define pci_lock_config(f)	do { (void)(f); } while (0)
-# define pci_unlock_config(f)	do { (void)(f); } while (0)
+# define pci_lock_config(f) ((void)(f))
+# define pci_unlock_config(f) ((void)(f))
 #else
 # define pci_lock_config(f)	raw_spin_lock_irqsave(&pci_lock, f)
 # define pci_unlock_config(f)	raw_spin_unlock_irqrestore(&pci_lock, f)
 #endif
 
 #define PCI_OP_READ(size, type, len) \
-int noinline pci_bus_read_config_##size \
-	(struct pci_bus *bus, unsigned int devfn, int pos, type *value)	\
+noinline int pci_bus_read_config_##size \
+	(struct pci_bus *bus, unsigned int devfn, int pos, type * value)	\
 {									\
 	unsigned long flags;						\
 	u32 data = 0;							\
@@ -55,7 +55,7 @@ int noinline pci_bus_read_config_##size \
 }
 
 #define PCI_OP_WRITE(size, type, len) \
-int noinline pci_bus_write_config_##size \
+noinline int pci_bus_write_config_##size \
 	(struct pci_bus *bus, unsigned int devfn, int pos, type value)	\
 {									\
 	unsigned long flags;						\
@@ -72,17 +72,16 @@ int noinline pci_bus_write_config_##size \
 }
 
 PCI_OP_READ(byte, u8, 1)
-PCI_OP_READ(word, u16, 2)
-PCI_OP_READ(dword, u32, 4)
-PCI_OP_WRITE(byte, u8, 1)
-PCI_OP_WRITE(word, u16, 2)
-PCI_OP_WRITE(dword, u32, 4)
-
 EXPORT_SYMBOL(pci_bus_read_config_byte);
+PCI_OP_READ(word, u16, 2)
 EXPORT_SYMBOL(pci_bus_read_config_word);
+PCI_OP_READ(dword, u32, 4)
 EXPORT_SYMBOL(pci_bus_read_config_dword);
+PCI_OP_WRITE(byte, u8, 1)
 EXPORT_SYMBOL(pci_bus_write_config_byte);
+PCI_OP_WRITE(word, u16, 2)
 EXPORT_SYMBOL(pci_bus_write_config_word);
+PCI_OP_WRITE(dword, u32, 4)
 EXPORT_SYMBOL(pci_bus_write_config_dword);
 
 int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn,
@@ -226,7 +225,7 @@ static noinline void pci_wait_cfg(struct pci_dev *dev)
 /* Returns 0 on success, negative values indicate error. */
 #define PCI_USER_READ_CONFIG(size, type)				\
 int pci_user_read_config_##size						\
-	(struct pci_dev *dev, int pos, type *val)			\
+	(struct pci_dev *dev, int pos, type * val)			\
 {									\
 	u32 data = -1;							\
 	int ret;							\
@@ -247,7 +246,7 @@ int pci_user_read_config_##size						\
 									\
 	return pcibios_err_to_errno(ret);				\
 }									\
-EXPORT_SYMBOL_GPL(pci_user_read_config_##size);
+EXPORT_SYMBOL_GPL(pci_user_read_config_##size)
 
 /* Returns 0 on success, negative values indicate error. */
 #define PCI_USER_WRITE_CONFIG(size, type)				\
@@ -268,7 +267,7 @@ int pci_user_write_config_##size					\
 									\
 	return pcibios_err_to_errno(ret);				\
 }									\
-EXPORT_SYMBOL_GPL(pci_user_write_config_##size);
+EXPORT_SYMBOL_GPL(pci_user_write_config_##size)
 
 PCI_USER_READ_CONFIG(byte, u8)
 PCI_USER_READ_CONFIG(word, u16)
-- 
2.34.1


             reply	other threads:[~2025-09-10 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10 18:48 Roshan Kumar [this message]
2025-09-11 17:26 ` [PATCH] pci: access: fixed coding style issues in access.c kernel test robot

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=20250910184809.392702-1-roshaen09@gmail.com \
    --to=roshaen09@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@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