From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2A7CC433FE for ; Tue, 7 Sep 2021 11:12:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C01D56105A for ; Tue, 7 Sep 2021 11:12:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244634AbhIGLNG (ORCPT ); Tue, 7 Sep 2021 07:13:06 -0400 Received: from mail.skyhub.de ([5.9.137.197]:33424 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233669AbhIGLNF (ORCPT ); Tue, 7 Sep 2021 07:13:05 -0400 Received: from zn.tnic (p200300ec2f1090004feb6f43ecfb7e39.dip0.t-ipconnect.de [IPv6:2003:ec:2f10:9000:4feb:6f43:ecfb:7e39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 3558B1EC0324; Tue, 7 Sep 2021 13:11:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1631013118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=Rb+s6nWrXZZPb+h+qjGLqr6R+QDvS03QLx+8+R4HbKA=; b=Hbs7V0sgghfv7SEsyxUvt4OaFXoMILNeyRAZclDALp3zA+tOkipvsBHDAwuuhVKoXDJUIr lo/AQv7tgh1HN9UVVYeqpy1zkEIy/eBh8Z9q5gb8/e7HWYNHmo39AUMJPIl8V0ihnhSUFA rCfXiDcA6EWpG3UXgojy6zF3lwic/2k= Date: Tue, 7 Sep 2021 13:11:51 +0200 From: Borislav Petkov To: Colin King Cc: Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , linux-edac@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] EDAC/device: Remove redundant initialization of pointer dev_ctl Message-ID: References: <20210907105913.15077-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210907105913.15077-1-colin.king@canonical.com> Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org On Tue, Sep 07, 2021 at 11:59:13AM +0100, Colin King wrote: > From: Colin Ian King > > The variable dev_ctl is being initialized with a value that is never > read, it is being updated later on. The assignment is redundant and > can be removed. > > Addresses-Coverity: ("Unused value") I'll never get a public reference to what those things mean, will I? > Signed-off-by: Colin Ian King > --- > drivers/edac/edac_device.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c > index 8c4d947fb848..a337f7afc3b9 100644 > --- a/drivers/edac/edac_device.c > +++ b/drivers/edac/edac_device.c > @@ -75,7 +75,6 @@ struct edac_device_ctl_info *edac_device_alloc_ctl_info( > * provide if we could simply hardcode everything into a single struct. > */ > p = NULL; > - dev_ctl = edac_align_ptr(&p, sizeof(*dev_ctl), 1); Are you absolutely sure this function doesn't have any side-effects, say, to &p and removing the call would break the pointer offsets for the one-shot allocation? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette