Skip to contentSkip to conversation

pci-sysfs: remove casts from void*

PATCH Applied Kulikov Vasiliy 2 participants 2 messages Jun 29, 2010 – Jul 2, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 9/25 pci-sysfs: remove casts from void*

Remove unnesessary casts from void*.

---
 drivers/pci/pci-sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pci/pci-sysfs.c +1 -1
index afd2fbf..7f8bc8c 100644
@@ -734,7 +734,7 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
 {
 	struct pci_dev *pdev = to_pci_dev(container_of(kobj,
 						       struct device, kobj));
-	struct resource *res = (struct resource *)attr->private;
+	struct resource *res = attr->private;
 	enum pci_mmap_state mmap_type;
 	resource_size_t start, end;
 	int i;
Signature · 1 line
1.7.0.4
Applied
#1 lore raw
Quoted 12 lines · On Tue, 29 Jun 2010 14:15:28 +0400 Kulikov Vasiliy <[email protected]> wrote:

Remove unnesessary casts from void*.

---
 drivers/pci/pci-sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pci/pci-sysfs.c +0 -0
index afd2fbf..7f8bc8c 100644

drivers/pci/pci-sysfs.c pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, · line 740

Quoted 8 lines
drivers/pci/pci-sysfs.c +1 -1
@@ -734,7 +734,7 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
 {
 	struct pci_dev *pdev = to_pci_dev(container_of(kobj,
 						       struct device, kobj));
-	struct resource *res = (struct resource *)attr->private;
+	struct resource *res = attr->private;
 	enum pci_mmap_state mmap_type;
 	resource_size_t start, end;
 	int i;

Applied to my linux-next branch, thanks.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center