On Wed, 2017-03-15 at 22:27 +0100, Sebastian Herbszt wrote:
> Use kref_read() instead of accessing the counter inside a kref.

Hello Sebastian,

It is a good habit for a patch that fixes a compilation warning to mention
the warning message that has been fixed in the patch description.

> @@ -3821,7 +3821,7 @@ efct_hw_io_free(struct efct_hw_s *hw, struct 
> efct_hw_io_s *io)
>  uint8_t
>  efct_hw_io_inuse(struct efct_hw_s *hw, struct efct_hw_io_s *io)
>  {
> -     return (atomic_read(&io->ref.refcount) > 0);
> +     return (kref_read(&io->ref) > 0);
>  }

A minor style comment: checkpatch should have told you that parentheses are
not necessary in a return statement ("return is not a function, parentheses
are not required").

Otherwise this patch looks fine to me.

Bart.

Reply via email to