* [PATCH 0/4] Fix checkpatch.pl WARNINGS
@ 2021-08-14 20:12 Aakash Hemadri
2021-08-14 20:12 ` [PATCH 1/4] PCI: Missing blank line after declarations Aakash Hemadri
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:12 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Shuah Khan, linux-pci, linux-kernel
Hi,
This patch series fixes checkpatch.pl WARNINGS in slot.c
This patch series will apply cleanly on pci-v5.14-changes
Aakash Hemadri (4):
PCI: Missing blank line after declarations
PCI: Symbolic permissions 'S_IRUGO' are not preferred
PCI: Prefer IS_ENABLED(CONFIG_HOTPLUG_PCI)
PCI: No space before tabs
drivers/pci/slot.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] PCI: Missing blank line after declarations
2021-08-14 20:12 [PATCH 0/4] Fix checkpatch.pl WARNINGS Aakash Hemadri
@ 2021-08-14 20:12 ` Aakash Hemadri
2021-08-14 20:12 ` [PATCH 2/4] PCI: Symbolic permissions 'S_IRUGO' are not preferred Aakash Hemadri
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:12 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Shuah Khan, linux-pci, linux-kernel
Fix checkpatch.pl WARNING: Missing a blank line after declarations
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
---
drivers/pci/slot.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index 751a26668e3a..6ee4ccaf30b3 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -20,6 +20,7 @@ static ssize_t pci_slot_attr_show(struct kobject *kobj,
{
struct pci_slot *slot = to_pci_slot(kobj);
struct pci_slot_attribute *attribute = to_pci_slot_attr(attr);
+
return attribute->show ? attribute->show(slot, buf) : -EIO;
}
@@ -28,6 +29,7 @@ static ssize_t pci_slot_attr_store(struct kobject *kobj,
{
struct pci_slot *slot = to_pci_slot(kobj);
struct pci_slot_attribute *attribute = to_pci_slot_attr(attr);
+
return attribute->store ? attribute->store(slot, buf, len) : -EIO;
}
@@ -123,6 +125,7 @@ static char *make_slot_name(const char *name)
for (;;) {
struct kobject *dup_slot;
+
dup_slot = kset_find_obj(pci_slots_kset, new_name);
if (!dup_slot)
break;
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] PCI: Symbolic permissions 'S_IRUGO' are not preferred
2021-08-14 20:12 [PATCH 0/4] Fix checkpatch.pl WARNINGS Aakash Hemadri
2021-08-14 20:12 ` [PATCH 1/4] PCI: Missing blank line after declarations Aakash Hemadri
@ 2021-08-14 20:12 ` Aakash Hemadri
2021-08-14 20:12 ` [PATCH 3/4] PCI: Prefer IS_ENABLED(CONFIG_HOTPLUG_PCI) Aakash Hemadri
2021-08-14 20:12 ` [PATCH 4/4] PCI: No space before tabs Aakash Hemadri
3 siblings, 0 replies; 5+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:12 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Shuah Khan, linux-pci, linux-kernel
Fix checkpatch.pl WARNING: Symbolic permissions 'S_IRUGO' are not
preferred. Consider using octal permission '0444'
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
---
drivers/pci/slot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index 6ee4ccaf30b3..a9678589ed23 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -86,11 +86,11 @@ static void pci_slot_release(struct kobject *kobj)
}
static struct pci_slot_attribute pci_slot_attr_address =
- __ATTR(address, S_IRUGO, address_read_file, NULL);
+ __ATTR(address, 0444, address_read_file, NULL);
static struct pci_slot_attribute pci_slot_attr_max_speed =
- __ATTR(max_bus_speed, S_IRUGO, max_speed_read_file, NULL);
+ __ATTR(max_bus_speed, 0444, max_speed_read_file, NULL);
static struct pci_slot_attribute pci_slot_attr_cur_speed =
- __ATTR(cur_bus_speed, S_IRUGO, cur_speed_read_file, NULL);
+ __ATTR(cur_bus_speed, 0444, cur_speed_read_file, NULL);
static struct attribute *pci_slot_default_attrs[] = {
&pci_slot_attr_address.attr,
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] PCI: Prefer IS_ENABLED(CONFIG_HOTPLUG_PCI)
2021-08-14 20:12 [PATCH 0/4] Fix checkpatch.pl WARNINGS Aakash Hemadri
2021-08-14 20:12 ` [PATCH 1/4] PCI: Missing blank line after declarations Aakash Hemadri
2021-08-14 20:12 ` [PATCH 2/4] PCI: Symbolic permissions 'S_IRUGO' are not preferred Aakash Hemadri
@ 2021-08-14 20:12 ` Aakash Hemadri
2021-08-14 20:12 ` [PATCH 4/4] PCI: No space before tabs Aakash Hemadri
3 siblings, 0 replies; 5+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:12 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Shuah Khan, linux-pci, linux-kernel
Fix checkpatch.pl WARNING: Prefer IS_ENABLED(CONFIG_HOTPLUG_PCI) over
defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
---
drivers/pci/slot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index a9678589ed23..8d1a983027b7 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -323,7 +323,7 @@ void pci_destroy_slot(struct pci_slot *slot)
}
EXPORT_SYMBOL_GPL(pci_destroy_slot);
-#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
+#if IS_ENABLED(CONFIG_HOTPLUG_PCI)
#include <linux/pci_hotplug.h>
/**
* pci_hp_create_module_link - create symbolic link to hotplug driver module
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] PCI: No space before tabs
2021-08-14 20:12 [PATCH 0/4] Fix checkpatch.pl WARNINGS Aakash Hemadri
` (2 preceding siblings ...)
2021-08-14 20:12 ` [PATCH 3/4] PCI: Prefer IS_ENABLED(CONFIG_HOTPLUG_PCI) Aakash Hemadri
@ 2021-08-14 20:12 ` Aakash Hemadri
3 siblings, 0 replies; 5+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:12 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Shuah Khan, linux-pci, linux-kernel
Fix checkpatch.pl WARNING: please, no space before tabs
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
---
drivers/pci/slot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index 8d1a983027b7..d7a60135168e 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -353,7 +353,7 @@ EXPORT_SYMBOL_GPL(pci_hp_create_module_link);
/**
* pci_hp_remove_module_link - remove symbolic link to the hotplug driver
- * module.
+ * module.
* @pci_slot: struct pci_slot
*
* Helper function for pci_hotplug_core.c to remove symbolic link to
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-14 20:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 20:12 [PATCH 0/4] Fix checkpatch.pl WARNINGS Aakash Hemadri
2021-08-14 20:12 ` [PATCH 1/4] PCI: Missing blank line after declarations Aakash Hemadri
2021-08-14 20:12 ` [PATCH 2/4] PCI: Symbolic permissions 'S_IRUGO' are not preferred Aakash Hemadri
2021-08-14 20:12 ` [PATCH 3/4] PCI: Prefer IS_ENABLED(CONFIG_HOTPLUG_PCI) Aakash Hemadri
2021-08-14 20:12 ` [PATCH 4/4] PCI: No space before tabs Aakash Hemadri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).