Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3083051rwb; Mon, 15 Aug 2022 17:42:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR4IaN4u/vfQ41801ceWF8d/gZA7e7NHa6S0X6HpAi3NprKJLzgNLQntr+u24kjtJge16kxp X-Received: by 2002:a17:906:845c:b0:730:bbf1:196a with SMTP id e28-20020a170906845c00b00730bbf1196amr12190085ejy.13.1660610566901; Mon, 15 Aug 2022 17:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610566; cv=none; d=google.com; s=arc-20160816; b=hyQHgrO7+48luOmpmvdMv4B8bZyJ8C/9UOFwraxMrB2UN41pkaLYIUNgLo8XWoI6p7 ZQHRir0TS/VU5JRUa1PxxFpFrp50X0qrgOFpPzzWfKGr/ncDNtLAz6TD0fRd5jI+mV8W Vt/oRiMpNlT2MfvO5QAFU5hAAf2SztNDuU8SO8yFB9I0U1hghK9ecf6uj9aOM5rPQRk1 rXLB9UG/kaTV6Ekfti4QAXw94UvH2PSMNKQN98bwLlgblyx9ujF/NX3QRIUJSwtNQloC WzKjOtMM4elrLULhKfekw5LJWrmgRa3+24cAfZzmah+bERwUZMENLfKesU5JgCsmZGnK 0MCA== 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=Mlky9KQCttw2RslipMW802Z8GiKLcKyAT7LybK1+jDY=; b=pfmn67cGEvj3KDeZM7yrlbpLz0I/sJLOpNjvhxJIZDRwYOekiW8ej2BRWn29q/m6YB 15iZiDUt30K0uKrFZM1AHagWPCH+GWwxt09tQzL0Lc6a54KsL7yHldIYycWj0qIHAvTV P6UvkPY4RxYpxH8Y0PQPrbmGW0BRnZ5U+rTg2u9WmvlAp9a0eUVj/cZ/30L6NowVH0WS MqUEefdvUCQe59b6ojm09iqFmksSYA6TtF4iTtSaoJAhwoJVP5o1NLZAJHZH7z8I7K8M JHDv9jjqP2NKcrgEwWVR3Zk9Dp7eizFiZslM4LYleF9sh+euKWo1JNqawjr1oWci7u/C RtbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VYjiEfsL; 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 g11-20020a1709061c8b00b00734804bb362si6939465ejh.568.2022.08.15.17.42.21; Mon, 15 Aug 2022 17:42:46 -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=VYjiEfsL; 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 S1348336AbiHOWXC (ORCPT + 99 others); Mon, 15 Aug 2022 18:23:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350693AbiHOWSN (ORCPT ); Mon, 15 Aug 2022 18:18:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8255123CA2; Mon, 15 Aug 2022 12:41:18 -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 5CB83B80EA8; Mon, 15 Aug 2022 19:41:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3EA4C433D6; Mon, 15 Aug 2022 19:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592476; bh=hwUVotYLPPfsowZItZNAHswZcEHPnU+JPQbbWO55Yh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VYjiEfsLDucngGw8/pwzs5BOPfNtIpxWP2DQr8FgWaLidTsBdgrDkF6dZrAVy5TWK qVaaD//4ORr83zkIN0QC1dPWnyp4j4L792Oj1wr78nxbmnJIUD+R9+l4i5ObqlO9Qd CGaX3R4YDK+4/gmrenmMi5LsVKWOiVs7Qrr8Y188= 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.18 0763/1095] um: random: Dont initialise hwrng struct with zero Date: Mon, 15 Aug 2022 20:02:42 +0200 Message-Id: <20220815180500.829772755@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 433a3f8f2ef3..32b3341fe970 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