Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1862262rwb; Fri, 19 Aug 2022 10:37:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR7+cicIjtvFGOe9fosb/WDi587YUI0MKLC+lSyaIzh4aYVvsdLyfLKNllYN8cvDGE/eT8RU X-Received: by 2002:a62:bd03:0:b0:536:150c:a1c0 with SMTP id a3-20020a62bd03000000b00536150ca1c0mr3341880pff.19.1660930628737; Fri, 19 Aug 2022 10:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930628; cv=none; d=google.com; s=arc-20160816; b=sZkH6bSnlvVnSA5kO+ixnHvFf+v7LhaNHNvfouYb5vPCX6g5WSzZMFr+RkssKmj9bb wQvce4VxkVgc5ULOipZeXG0b3h8wMQ2ahge6oKvZRQlGxK7/mqegFrgsNnYnUdfQ6f46 u47p8j5Z5G2o7UQoVF7WJ+NfSpMl1eXU58XKySldUiLEZP0greJKp54eyB/8AHev+vHC XdjWWXDt7UHbiiXmGyCrAZ+8f7zu9/vAFMYLo8ivNk1SGXNRtIfbwXcytpMqZPThIla8 CEWmCxUVkpoAgXOuqAFO5bgOKlALGsSfNd2re2mHqqx46856wizPpPXic3Jj9/QCaafV QCpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=q8lUCPwX69rNN7Ez0Zfud8G+zrJJx9Dfzp+VoqAIfPk=; b=hTk2CQD/Wi9CxkUCljHXKJnaRzGNVogVe3fhbQxQVBBEX4rAanWRp+mJmFdut7V1P9 05U4g5Lfo9jR3+MOG7cGMLzn5D5w0GDccWwiF8bJ6lQsn0p/5jJb5xryxoqJ4HkIzVh0 pEXPaawQgaqiewESiGMpCZNfN+MP3/tQViRnoniRn182eppkjLW2hmIq9RPxVValgfFx U0JM6dsz1JNLnbBQzT/+QRoPWskVa3k+1PhBg2n2zpdzfARxZhxZO4DTrkGx6CJ1Yyhe SAkLaxCE/MkR+WyfOYUdGTM7rTKFAdouQBD5d7SzZ1RjCEB4/DfH6rcLLt7DTG5RF9p3 JPPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DPO8KRIY; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e65-20020a636944000000b0041e1bbc16a8si4335052pgc.608.2022.08.19.10.36.57; Fri, 19 Aug 2022 10:37:08 -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=@linuxfoundation.org header.s=korg header.b=DPO8KRIY; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352888AbiHSQZr (ORCPT + 99 others); Fri, 19 Aug 2022 12:25:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352476AbiHSQVF (ORCPT ); Fri, 19 Aug 2022 12:21:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB4482649; Fri, 19 Aug 2022 09:02:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 54CCEB8280F; Fri, 19 Aug 2022 16:02:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5E58C433C1; Fri, 19 Aug 2022 16:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924942; bh=WsWSH+oyi1DODDRADVOG7AcofdZtoMJUgq/k2eKaiPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DPO8KRIYD2eIhCMrEx4hCNSv8uh/Du//ub7DW2NCyVauKRyfHguhqiD7jxbiNrbRT hTHxCXCDuMxS+OtHrJy8ytlfX8XymQqK9VDp/4dxPFnUSAT1XO8tHGgGvK7rcMzGUm 3s+VdmiejHKgpd9PtUAmUDRTpKHfXZVGWyvEOC3w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Christopher Obbard , Richard Weinberger , Sasha Levin Subject: [PATCH 5.10 331/545] um: random: Dont initialise hwrng struct with zero Date: Fri, 19 Aug 2022 17:41:41 +0200 Message-Id: <20220819153844.191617220@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Christopher Obbard [ Upstream commit 9e70cbd11b03889c92462cf52edb2bd023c798fa ] Initialising the hwrng struct with zeros causes a compile-time sparse warning: $ ARCH=um make -j10 W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ... CHECK arch/um/drivers/random.c arch/um/drivers/random.c:31:31: sparse: warning: Using plain integer as NULL pointer Fix the warning by not initialising the hwrng struct with zeros as it is initialised anyway during module init. Fixes: 72d3e093afae ("um: random: Register random as hwrng-core device") Reported-by: kernel test robot Signed-off-by: Christopher Obbard Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/drivers/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index e4b9b2ce9abf..4b712395763e 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c @@ -28,7 +28,7 @@ * protects against a module being loaded twice at the same time. */ static int random_fd = -1; -static struct hwrng hwrng = { 0, }; +static struct hwrng hwrng; static DECLARE_COMPLETION(have_data); static int rng_dev_read(struct hwrng *rng, void *buf, size_t max, bool block) -- 2.35.1