Re: [PATCH 09/30] staging: mt7621-mmc: Remove function uffs

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

 



On Mon, Apr 30 2018, Christian Lütke-Stetzkamp wrote:

> On Mon, Apr 30, 2018 at 08:28:26AM +1000, NeilBrown wrote:
>> On Sun, Apr 29 2018, Christian Lütke-Stetzkamp wrote:
>> 
>> > The function uffs that is implemented by this driver returns the same
>> > values as the kernel function ffs. So the uffs function is removed and
>> > the calls to it are replaced with calls to ffs.
>> 
>> This difference is that uffs receives and returns an "unsigned int".
>> Maybe not a significant difference, but worth mentioning that you
>> noticed it and reasoned that it wasn't significant.
>>
> Yes the type of the uffs function is unsigned int but I tested it for
> all values, that the number returned is the same (in binary form). So
> I don't think that it is significant.
>
>> > @@ -1004,13 +975,13 @@ static inline void sdr_clr_bits(void __iomem *reg, u32 bs)
>> >  do {								\
>> >  	volatile unsigned int tv = sdr_read32(reg);			\
>> >  	tv &= ~(field);							\
>> > -	tv |= ((val) << (uffs((unsigned int)field) - 1));		\
>> > +	tv |= ((val) << (ffs((unsigned int)field) - 1));		\
>> 
>> Given that ffs() takes an "int", it is odd to cast "field" to an
>> unsigned int to pass it.
>> "field" is always a constant int, so no cast is needed.
>
> That's correct, but I took it that way, because that is how the mtk-sd
> driver does it. This makes the similarities more significant, but if
> you like I'll change it.

Ahhh, OK.  I guess it makes sense to say "bug-for-bug" (sort-of)
compatible with the mtk-sd driver code.  I'll try to remember to fix
that up once this all lands.

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux