Re: [PATCH 5/7] S3C64XX: Add platform data and driver resources for IDE controller driver.

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

 



On Sun, Nov 1, 2009 at 10:05 PM, Ben Dooks <ben-linux@xxxxxxxxx> wrote:
> On Sun, Nov 01, 2009 at 01:56:43PM +0900, Thomas Abraham wrote:
>> This patch adds the following for S3C IDE driver.
>>       - IDE plafrom data strucure definition
>>       - IDE driver resources
>>       - IDE controller GPIO setup code
>>       - IDE platform data setup code
>>       - IDE platform device definition
>>
>> +void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata)
>> +{
>> +     struct s3c_ide_platdata *pd;
>> +
>> +     pd = (struct s3c_ide_platdata *)kmemdup(pdata,
>> +             sizeof(struct s3c_ide_platdata), GFP_KERNEL);
>
> you do not need pd = (struct s3c_ide_platdata *), the result of kmemdup
> is 'void *' and thus can be cast to 'struct s3c_ide_platdata *'. Removing
> this will make the code flow better.
>
> doing:
>
>        if (!pd)
>                printk(KERN_ERR "%s: no memory for platform data\n", __func__);
>        else
>                s3c_device_cfcon.dev.platform_data = pd;
>
> would be better.

Ok. I will modify the code.

>
> other than the comments, this looks ok.
>
> --
> Ben
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux