Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36076687rwd; Mon, 10 Jul 2023 17:43:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHYbuSoA28bHTkfz9S78uYMJMO/LpUkSY6e9Mndn2eKH65BLkr/YNcoSEC1nZCW8+QONmc7 X-Received: by 2002:a17:906:73d8:b0:993:d47f:3c7d with SMTP id n24-20020a17090673d800b00993d47f3c7dmr11765870ejl.6.1689036230015; Mon, 10 Jul 2023 17:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689036230; cv=none; d=google.com; s=arc-20160816; b=mUeOo+9o1e4eyzUiyHuPoGXf4r/n/HsPqGiiEAKYbnHYp7B2ycCET6gXBxfG+J/a7Q CVkC+OsPl17DBhKJ7ahBTccyntQGwQowTTZ2GK7cUWYJU5TOc9HDYrJoTW3b7NDFAdjH AdpxHrDx42eTdmJ8P6u9OAmih0IjeLycLuXHMK05Nj6q0DodJqRYQDG1PcE2Ennm4FQZ r55QVolufhk+r5DRTF+JfxJX+5+KgvcDXqxXpoov+EnpJZZplfh+7aXe35SyNwqAE+7L ZX5OcbKzjJ8nI/Js51B4Hs80U9ZUJjCvghc8yY4gSX0m0KoBxoonKbMaTgMj0Dc27m07 k4Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=t61C3Kzij6L6ahnNEJf8ZGCpSpxLtzO2LUldnLIH2dk=; fh=rKY5L9Alr9eQUULuNSHuO98PHrIIhSb/OCQrV8oqoFY=; b=vVH976u7SfeqYEa2wM2MdjAKZuzA2pJ1X2H+zgx9Iv9UW4pLLE0i/FGuymKcTbiFSG fPKNQbgWg0/1RnvczaPDpdCMnVcHr/3ofJb7AOEai3ZsM/iZ1RFW9GTiQ+i92mC1VGeX CVKHW9dqyhQtGGUHf/tKNc8lo/s6RYtKmUrDYtgcrmAzSpFXF6yUDT8D0+oaL/3Qsaoy TsCsNQDO5Cjm8cAwr71MMqKmJugj9FCsjzOTKNj/0/A1+GCwgIwU2gZDPqI7h62Yyyik IVHnTL0voxAAh5CzYsQZP20d64RM/DxBgHMvVC4ihE4QHBPiostyo7JA3WQYka1tcoNK fU/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zzk5WNDr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020a170906590b00b0098f99532db2si771715ejq.666.2023.07.10.17.43.26; Mon, 10 Jul 2023 17:43:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zzk5WNDr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230182AbjGKA0d (ORCPT + 99 others); Mon, 10 Jul 2023 20:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjGKA0c (ORCPT ); Mon, 10 Jul 2023 20:26:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32735FB; Mon, 10 Jul 2023 17:26:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A90F8612A4; Tue, 11 Jul 2023 00:26:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E615C433C9; Tue, 11 Jul 2023 00:26:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689035190; bh=lVrofRqiJZB0YCzZdm1yhUomL1wJDgSyd4Dqv2IN7uY=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=Zzk5WNDrd+OKZA4Oy4dFF3EaoRZ0C27ag8ozEM2+AH6eodYs1L5wJMZ22Bh6Yp2pc SFkDAv84AYDuu8JHXV56u28E54iTQhbS8gCAbHGVF0ayrPBrHaRl1ZVkC5qknoA4F/ 8fTkOJ8ZhtL7JCtf5vFzoNFvl7f+Nn86f7x2HPpIzOCCbjVpqz1I7G65SFg3QDNEkV 9pyZNr1dulrvyyBzfWZ3rT+EMZaD543IvXLMUXIQglH0MxSObAbEBAyTtOQscapuS0 5M0zEOz5yzgheP/kKYDq710jYhUgqNxWVtLx7AHthsyJpmFJckIGnxrVhCmqD7CWOQ CG6xnTANVba+Q== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 11 Jul 2023 03:26:26 +0300 Message-Id: Cc: , Subject: Re: [PATCH][next] tpm: remove redundant variable len From: "Jarkko Sakkinen" To: "Colin Ian King" , "Peter Huewe" , "Jason Gunthorpe" , X-Mailer: aerc 0.14.0 References: <20230616170730.2343540-1-colin.i.king@gmail.com> In-Reply-To: <20230616170730.2343540-1-colin.i.king@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri Jun 16, 2023 at 8:07 PM EEST, Colin Ian King wrote: > Variable len is being accumulated but the value is never read. It is > redundant and can be removed. Cleans up clang scan build warning: > > drivers/char/tpm/eventlog/tpm1.c:276:2: warning: Value stored to 'len' is= never read [deadcode.DeadStores] > > Signed-off-by: Colin Ian King > --- > drivers/char/tpm/eventlog/tpm1.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/char/tpm/eventlog/tpm1.c b/drivers/char/tpm/eventlog= /tpm1.c > index 8aa9057601d6..12ee42a31c71 100644 > --- a/drivers/char/tpm/eventlog/tpm1.c > +++ b/drivers/char/tpm/eventlog/tpm1.c > @@ -251,7 +251,6 @@ static int tpm1_binary_bios_measurements_show(struct = seq_file *m, void *v) > =20 > static int tpm1_ascii_bios_measurements_show(struct seq_file *m, void *v= ) > { > - int len =3D 0; > char *eventname; > struct tcpa_event *event =3D v; > unsigned char *event_entry =3D > @@ -273,7 +272,7 @@ static int tpm1_ascii_bios_measurements_show(struct s= eq_file *m, void *v) > /* 3rd: event type identifier */ > seq_printf(m, " %02x", do_endian_conversion(event->event_type)); > =20 > - len +=3D get_event_name(eventname, event, event_entry); > + get_event_name(eventname, event, event_entry); > =20 > /* 4th: eventname <=3D max + \'0' delimiter */ > seq_printf(m, " %s\n", eventname); > --=20 > 2.39.2 Reviewed-by: Jarkko Sakkinen BR, Jarkko