Re: [tip:x86/apic] x86, PCI, ACPI: Kill private function resource_to_addr() in arch/x86/pci/acpi.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 10 Dec 2014, Yinghai Lu wrote:
> On Wed, Dec 10, 2014 at 12:15 PM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> >> -       struct resource r = {
> >> -               .flags = 0
> >> -       };
> >> +       struct resource r;
> >>
> >> +       memset(&r, 0, sizeof(r));
> >
> > What's the point of this change? Both initialize r to 0. memset()
> > generates better code, but that's irrelevant for the problem at hand.
> 
> late there is
> 
> info->res[info->res_num] = r;
> 
> don't want the random pointer in r get copied.

Did you actually read what I wrote?

    	struct resource r = {
	       .flags = 0
	};

initializes r completely to 0. So how do you get a random pointer in r?

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux