Re: [PATCH] otg/ulpi.c : fix register write

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

 



Le 23/06/2010 16:58, Daniel Mack a écrit :
On Wed, Jun 23, 2010 at 04:50:32PM +0200, Eric Bénard wrote:
-static int ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg)
+static int ulpi_write(struct otg_transceiver *otg, u32 reg, u32 val)

Urgs. Is this really necessary? It's not that I have a strong opinion
about the order of arguments in such cases (I kept to the convention
of __readl() when I wrote it). But _changing_ it like this is really
confusing. Once in awhile I stumble over such API changes and I always
wonder about the reason. The problem is that not even the compiler will
warn you if you got it wrong, when you copied a sniplet from older
sources etc.

And you really want to break someone knee caps once you find out what
caused the breakage ;)

So - if we can avoid that, we should do. If anyone speaks up with a real
reason for changing it, I'd be fine :)

No problem if you prefer to keep as it is (this is "cosmetic" but val and reg are reversed in include/linux/usb/otg.h which I took as the reference in the present case). Do you have any opinion on the other part of the patch which removes ULPI_SET as this prevents to clear bits in the phy register ? If ok for you, I send a revised patch containing only this change.

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux