public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Haberland <sth@linux.ibm.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
	Jan Hoeppner <hoeppner@linux.ibm.com>,
	linux-s390@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Justin Stitt <justinstitt@google.com>
Subject: [PATCH 1/3] partitions/ibm: Remove unnecessary memset
Date: Fri, 15 Sep 2023 15:09:59 +0200	[thread overview]
Message-ID: <20230915131001.697070-2-sth@linux.ibm.com> (raw)
In-Reply-To: <20230915131001.697070-1-sth@linux.ibm.com>

From: Jan Höppner <hoeppner@linux.ibm.com>

The data holding the volume label information is zeroed in case no valid
volume label was found. Since the label information isn't used in that
case, zeroing the data doesn't provide any value whatsoever.

Remove the unnecessary memset() call accordingly.

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
---
 block/partitions/ibm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/block/partitions/ibm.c b/block/partitions/ibm.c
index 403756dbd50d..49eb0e354fc4 100644
--- a/block/partitions/ibm.c
+++ b/block/partitions/ibm.c
@@ -124,8 +124,6 @@ static int find_label(struct parsed_partitions *state,
 			break;
 		}
 	}
-	if (!found)
-		memset(label, 0, sizeof(*label));
 
 	return found;
 }
-- 
2.39.2


  reply	other threads:[~2023-09-15 13:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 13:09 [PATCH 0/3] partitions/ibm: Replace strncpy() and cleanups Stefan Haberland
2023-09-15 13:09 ` Stefan Haberland [this message]
2023-09-15 13:10 ` [PATCH 2/3] partitions/ibm: Replace strncpy() and improve readability Stefan Haberland
2023-09-15 13:10 ` [PATCH 3/3] partitions/ibm: Introduce defines for magic string length values Stefan Haberland
2023-10-04  9:59 ` [PATCH 0/3] partitions/ibm: Replace strncpy() and cleanups Stefan Haberland
2023-10-04 14:04   ` Jens Axboe
2023-10-04 14:04 ` Jens Axboe

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=20230915131001.697070-2-sth@linux.ibm.com \
    --to=sth@linux.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=borntraeger@de.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hoeppner@linux.ibm.com \
    --cc=justinstitt@google.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /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