Re: [PATCH] mmc: slot-gpio: Add support for power gpios

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

 



Hi Guennadi,

Thanks for getting to this review so quickly!  I agree with all of your
comments.  I'm sending out v2 of both patches now.

On Sun, Sep 09 2012, Guennadi Liakhovetski wrote:
>> The zero-length array trick might be becoming unmaintainable as we add
>> more labels to the struct like this.  Do you think we should keep it
>> as-is, or change to individual allocations?  Thanks!
>
> Yeah, it's becoming a bit messy... But I also don't find dynamically 
> allocating multiple tiny memory areas with the same life-cycle 
> particularly elegant... Are you expecting many more GPIOs to be added 
> here?

No, I don't expect needing to add more -- I just found myself wondering
if there was a better way and thought I'd mention it.  Performing
multiple allocations is unattractive too, I agree.

> What we could do, though, we could add macros for various pin function
> names, their lengths, offsets and the total length, to make the
> calculations look less cryptic. Would that be a good alternative?

Adding the comments is probably fine for now; I'd be okay with waiting
to see if we need more GPIO types and revisiting a better solution then.

Thanks!

- Chris.
-- 
Chris Ball   <cjb@xxxxxxxxxx>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux