Skip to contentSkip to conversation

alpha: remove cast from void*

PATCH In review matt mooney 3 participants 3 messages Sep 14, 2010 – Sep 19, 2010

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

PATCH 2/4 alpha: remove cast from void*

Unnecessary cast from void* in assignment.

---
 arch/alpha/kernel/pci-sysfs.c |    2 +-
 arch/alpha/kernel/srm_env.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/alpha/kernel/pci-sysfs.c +1 -1
index 738fc82..b899e95 100644
@@ -66,7 +66,7 @@ static int pci_mmap_resource(struct kobject *kobj,
 {
 	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;
 	struct pci_bus_region bar;
 	int i;
arch/alpha/kernel/srm_env.c +1 -1
index 4afc1a1..f0df3fb 100644
@@ -87,7 +87,7 @@ static int srm_env_proc_show(struct seq_file *m, void *v)
 	srm_env_t	*entry;
 	char		*page;
 
-	entry = (srm_env_t *)m->private;
+	entry = m->private;
 	page = (char *)__get_free_page(GFP_USER);
 	if (!page)
 		return -ENOMEM;
Signature · 1 line
1.7.2.1
maintainer
#2 lore raw
In reply to matt mooney
Quoted 35 lines · matt mooney

Unnecessary cast from void* in assignment.

---
 arch/alpha/kernel/pci-sysfs.c |    2 +-
 arch/alpha/kernel/srm_env.c   |    2 +-

 2 files changed, 2 insertions(+), 2 deletions(-)
arch/alpha/kernel/pci-sysfs.c +1 -1
index 738fc82..b899e95 100644
@@ -66,7 +66,7 @@ static int pci_mmap_resource(struct kobject *kobj,
  {
        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;
        struct pci_bus_region bar;
        int i;
arch/alpha/kernel/srm_env.c +1 -2
index 4afc1a1..f0df3fb 100644
@@ -87,7 +87,7 @@ static int srm_env_proc_show(struct seq_file *m, void *v)
        srm_env_t       *entry;
        char            *page;
 
-       entry = (srm_env_t *)m->private;
+       entry = m->private;
        page = (char *)__get_free_page(GFP_USER);
        if (!page)
                return -ENOMEM;
--
Quoted 1 line

1.7.2.1

Thanks! Applied.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html