public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Francisco Gutierrez <frankramirez@google.com>
Cc: Jack Wang <jinpu.wang@cloud.ionos.com>,
	"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jerry.Wong@microchip.com, vishakhavc@google.com
Subject: Re: [PATCH] scsi: pm80xx: Fix race condition caused by static variables
Date: Tue, 05 Aug 2025 22:30:46 -0400	[thread overview]
Message-ID: <yq1y0rx9odi.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20250723183543.1443301-1-frankramirez@google.com> (Francisco Gutierrez's message of "Wed, 23 Jul 2025 18:35:43 +0000")


Francisco,

> -	for (; start < end; start++)
> -		str += sprintf(str, "%08x ", *(temp+start));
> -	count++;

> +	for (; pm8001_ha->iop_log_start < pm8001_ha->iop_log_end; pm8001_ha->iop_log_start++)
> +		str += sprintf(str, "%08x ", *(temp+pm8001_ha->iop_log_start));
> +	pm8001_ha->iop_log_count++;

Since the start, end, and count variables are only used in this
function, what is the point of putting them in 'struct pm8001_hba_info'?
It makes the lines longer and harder to read...

-- 
Martin K. Petersen

  reply	other threads:[~2025-08-06  2:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23 18:35 [PATCH] scsi: pm80xx: Fix race condition caused by static variables Francisco Gutierrez
2025-08-06  2:30 ` Martin K. Petersen [this message]
2025-08-11 21:22   ` Francisco Gutierrez Ramirez
2025-08-31  2:11 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1y0rx9odi.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Jerry.Wong@microchip.com \
    --cc=frankramirez@google.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=vishakhavc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox