Re: [PATCH] i2c: designware: Fix handling of real but unexpected device interrupts

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

 



+ Hans

I forgot to Cc you yesterday even especially had a question for you :-(

Patch here and my comment to Andy below.

https://patchwork.ozlabs.org/project/linux-i2c/patch/20220927135644.1656369-1-jarkko.nikula@xxxxxxxxxxxxxxx/

On 9/27/22 17:35, Andy Shevchenko wrote:
On Tue, Sep 27, 2022 at 04:56:44PM +0300, Jarkko Nikula wrote:
  #define STATUS_IDLE			0x0

A side note: I think the clearer is to use STATUS_MASK and use
'&= ~STATUS_MASK' instead of '= STATUS_IDLE' in the affected pieces
of the code.

-#define STATUS_WRITE_IN_PROGRESS	0x1
-#define STATUS_READ_IN_PROGRESS		0x2
+#define STATUS_ACTIVE			0x1
+#define STATUS_WRITE_IN_PROGRESS	0x2
+#define STATUS_READ_IN_PROGRESS		0x4

Can we at the same time replace them with BIT()?

...

Otherwise looks good to me,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Good points. I'll add these to follow up patches.

Jarkko



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux