Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3087174rwb; Mon, 15 Aug 2022 17:49:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR6d/WzLv85Sv9fpPFxEFRUqUQyiAW5jbLwp1G/d9K+3+Q/kBtVhm52GUfNZPwMeSlNpuVpR X-Received: by 2002:a17:907:7f22:b0:738:72f3:87d5 with SMTP id qf34-20020a1709077f2200b0073872f387d5mr1904467ejc.393.1660610942793; Mon, 15 Aug 2022 17:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610942; cv=none; d=google.com; s=arc-20160816; b=f6vjHEsCDg8cNsDvqBY0uw1qAwZ7ujxRhPcv8FvoG4tIKs6CEHvfLlvwoYI1YKCWqg ibNXorR8iWQvFYhhBzFDUNHXaRNJGTbiebPMfi0R8RKIFIyeLhuoUesWPnJX/4g3F264 10kV08dvH8BZn6rpcb1aC6P9+ATlVvgQrM/Ch+Du14z0ABpWyhPgQ+7FEjzFtlIt5x02 qWj58AV1d+z+VkvsbUilPtVJFhzL8UuRDskPIIcRWW8gOb1hS0YszYmgygS/hmegLjsn 5Q9ZZdXnGx4ltZY8xJpyOXcaXyJ6Q9JIc29/02+vlyKWSi8BRlfxwg8WeLAeNUHMblcf bUOQ== 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=CsB6ngkk946XfwX9LRnsrfjsv44SglX6qR2ZExU8b57CVb8ewug7ljD3xcbQX8PyIb 0UG1yjzHcdwVhK0hcq8HiUFjiNLnn0OpEuqgy+h7SMBqor+gEEkRtFmCOclx9VsQS3Uo 8zwPavqHsrdNry0iuQeSgLGEWZVwVY2atvM/yIkyrUrLpfesYRV6eA1o2xZ/yhHenWj0 wS3UIL+7wVicVFfd5z6vNTavk0D5SjzHIpQDDt+7UVIJz8+Z8Mc97eg4KOUceqxCUEBw 0uYXegpa0n2PsCU6azERWsS2SD0UOsmTEJaMHzfguRqic0X+l+e+Okcu+kxBqETLhGvm JDSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wDZVkQcU; 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 sb31-20020a1709076d9f00b00730d106e81asi10022070ejc.255.2022.08.15.17.48.37; Mon, 15 Aug 2022 17:49:02 -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=wDZVkQcU; 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 S233448AbiHPAX6 (ORCPT + 99 others); Mon, 15 Aug 2022 20:23:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350989AbiHPAUH (ORCPT ); Mon, 15 Aug 2022 20:20:07 -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 0BC9717B814; Mon, 15 Aug 2022 13:33:32 -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 15FF3B8114A; Mon, 15 Aug 2022 20:33:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A35CC433D6; Mon, 15 Aug 2022 20:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595608; bh=hwUVotYLPPfsowZItZNAHswZcEHPnU+JPQbbWO55Yh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wDZVkQcUBElgn39qdDhdXxAw3iU4XCSz1rXbB7QX8gf2P8lAu9VzeahLjS8hbLobP 4rvpdJ5ItDNBAkoaPY3qJzWta1z5otHzuXl6/El7QMVbEAecw48R6ruRIsfh4Nk0CR gxcAimB2RXDmNeu9ZZ4HFhFmDCmsoxbhAh8yqSm0= 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.19 0818/1157] um: random: Dont initialise hwrng struct with zero Date: Mon, 15 Aug 2022 20:02:54 +0200 Message-Id: <20220815180512.202761718@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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