Re: [PATCH v2] staging: nvec: Use x instead of x != NULL to improve readability.

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

 



On 6/26/24 23:37, Tom Mounet wrote:
Issue identified by checkpatch.

Signed-off-by: Tom Mounet <tommounet@xxxxxxxxx>
---
  drivers/staging/nvec/nvec.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index e5ca78e57..814eb121c 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -300,7 +300,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
  {
  	mutex_lock(&nvec->sync_write_mutex);
- if (msg != NULL)
+	if (msg)
  		*msg = NULL;
nvec->sync_write_pending = (data[1] << 8) + data[0];
@@ -322,7 +322,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
dev_dbg(nvec->dev, "nvec_sync_write: pong!\n"); - if (msg != NULL)
+	if (msg)
  		*msg = nvec->last_sync_msg;
  	else
  		nvec_msg_free(nvec, nvec->last_sync_msg);

Hi Tom,

please answer the why also in the description.

The change history is missing.

If you send in a third version of this patch please use a change history. Description from Dan under:
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/

Thanks for your support.

Bye Philipp




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux