Re: [PATCH v5 20/28] mtd: rawnand: Hide the chip->data_interface indirection

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

 



Hi Boris,

Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> wrote on Tue, 26 May
2020 23:36:20 +0200:

> On Tue, 26 May 2020 21:17:17 +0200
> Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:
> 
> > As a preparation for allocating the data interface structure
> > dynamically (and rename it), let's avoid calling it directly.
> > 
> > Instead, we operate a rename on an existing helper to reuse that name
> > for another helper:
> > * s/nand_get_sdr_timings/nand_extract_sdr_timings/  
> >   -> this helper just extracts timings from a given data interface  
> 
> Hm, I'm not entirely happy with that name. In my mind extract means
> that you had to do some transformation to get the data, which is not
> the case here. How about nand_data_interface_get_sdr_timings()? 
> 
> > * nand_get_sdr_timings()  
> >   -> this helper retrieves the in use timings from a nand_chip structure  
> 
> Do we really need that one? Can we do that in 2 steps instead?

Yes I can do that in two steps, I didn't think it was needed but no pb.

> 
> conf = nand_get_data_interface_config(chip);
> sdr = nand_data_interface_get_sdr_timings(conf);

I find the names too long. Do you think I can stick to
nand_get_sdr_timings(conf) and nand_get_data_interface(chip)? These
helpers are very often used at the start of a function and would
definitely break systematically the 80 chars limit otherwise...

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux