Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp331613iof; Mon, 6 Jun 2022 04:27:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxRs+0jUUQk3m1pqSJAtR17mQooMkREbmv3tf0y6Q/4UEfzTpBYRcDfiGZ66viEi5C5pNv X-Received: by 2002:a17:902:c945:b0:163:c3c3:aff8 with SMTP id i5-20020a170902c94500b00163c3c3aff8mr23944249pla.56.1654514847434; Mon, 06 Jun 2022 04:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654514847; cv=none; d=google.com; s=arc-20160816; b=dcuwFbMiomCJcUbLJXTw5r6BN/3pFwTMr6iKUJEgppZ7dZEr3hj2pjAsGys15j3a7D +vo7qGbwW0pNIui3SF1bXBmzBjbqUw8AzGv9ex+GRHtso6ZfgoVynVfn7/XTjhvvpToL YXNPAJ3YNZo8md4iRL3nrJLRTa7VGvNN1I/yX5O0Aalu7NGMSlmv6u52Snzvt48OIDie gb/0A1tvCBQ7sHBHtoypNO6XSudSvcdGoIx3N6F0p8SVgbWWiuiCyB27qzjzIE3PwJKp zl5vuJVhTR3mu/L+ylIrFKg5pOTyGEOYdmhbhybK6rp5k4t0nrUmmlYtmF6E3TVERDUW 5/PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=Wr8FCbem3aj65Wh+I+zv+VllZ72cnIc10CFVOpIOKKM=; b=RK5lETBBd6zp+zXbc/ZMxjbchyL4jbTQT6o8/wqykcntrLyLF4XrJY0/xfLPE0mYg6 ttbxNgrF9nMrJdV4WapfGQ6pjrN3RQTErnZs3HETXbFdBK2qqr6hsPZaqhQMVsCFPyM7 UTAOeflET7VnL3CKz0LiWgva+FbZBPfUciNDNlvOLPISfOIPjp9oibLKq2LD1qEZ5AUt qmYizG0hdfMTZtfqOQX1I+HavUG29NeahH80nwEr5eLs+7gTObe9x2lzPA6xP1OFd+36 V0swh4MED6oiAVP3EJyXyG4xzvEJDrTVLXT/Wf0+ZhbiCnsi/u4mzny0s4HhUa4/jGAu LUuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nDLCRCht; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 19-20020a170902e9d300b0016184b32d35si19056783plk.174.2022.06.06.04.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 04:27:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nDLCRCht; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BFC7CE6B; Mon, 6 Jun 2022 04:16:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235162AbiFFLQa (ORCPT + 99 others); Mon, 6 Jun 2022 07:16:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235144AbiFFLQ2 (ORCPT ); Mon, 6 Jun 2022 07:16:28 -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 56305250263 for ; Mon, 6 Jun 2022 04:16:27 -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 1249DB8180B for ; Mon, 6 Jun 2022 11:16:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D89A2C385A9; Mon, 6 Jun 2022 11:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654514184; bh=lbtfeYdImcvmzfGaiNs/lA6wQ3sL262m0qtUAO6DXas=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nDLCRCht67p9Ndiz+FpLPC1/7fn2r3WS9FdfTA8tXFAqiyGy35yDSM5BpPmQzbgOf RIn2Qmoc4zCLvW2FdJq1LJwF74w0iRtYRCpsnkQEjlTgTmpkCcFlu+5l/KnN9Z4Z2r KZ+d9HdCUIMiqPce0MqmacCTBncgkihIFoRk9yuZpmgnuW+6L+DxVc6k3TCMz1un09 NZ3agMOd3BFWi23CnOdj7QQB2mB+x50B9YOnOG2jtJ4YC1O2/NaFL8nPN67l+zfOEB WKGnc2CHWxJP/JWSXx+plyw+XsKuC6F6ZzBwHMwnV2iWe18ZCFs2WT5tTXgCo55eRf 8nrnKfYPy9oew== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nyAic-00FssW-GN; Mon, 06 Jun 2022 12:16:22 +0100 Date: Mon, 06 Jun 2022 12:16:22 +0100 Message-ID: <87zgiq3uux.wl-maz@kernel.org> From: Marc Zyngier To: Dan Carpenter Cc: kbuild@lists.01.org, Hector Martin , lkp@intel.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: drivers/irqchip/irq-apple-aic.c:941 aic_of_ic_init() error: uninitialized symbol 'off'. In-Reply-To: <202206010439.LRgjym7t-lkp@intel.com> References: <202206010439.LRgjym7t-lkp@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: dan.carpenter@oracle.com, kbuild@lists.01.org, marcan@marcan.st, lkp@intel.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Mon, 06 Jun 2022 12:08:03 +0100, Dan Carpenter wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 8ab2afa23bd197df47819a87f0265c0ac95c5b6a > commit: dc97fd6fec009957e81026055fc99a03877ff3b8 irqchip/apple-aic: Dynamically compute register offsets > config: arm64-randconfig-m031-20220530 (https://download.01.org/0day-ci/archive/20220601/202206010439.LRgjym7t-lkp@intel.com/config) > compiler: aarch64-linux-gcc (GCC) 11.3.0 > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot > Reported-by: Dan Carpenter > > New smatch warnings: > drivers/irqchip/irq-apple-aic.c:941 aic_of_ic_init() error: uninitialized symbol 'off'. > > vim +/off +941 drivers/irqchip/irq-apple-aic.c > > 76cde26394114f Hector Martin 2021-01-21 900 static int __init aic_of_ic_init(struct device_node *node, struct device_node *parent) > 76cde26394114f Hector Martin 2021-01-21 901 { > 76cde26394114f Hector Martin 2021-01-21 902 int i; > dc97fd6fec0099 Hector Martin 2022-03-10 903 u32 off; > 76cde26394114f Hector Martin 2021-01-21 904 void __iomem *regs; > 76cde26394114f Hector Martin 2021-01-21 905 struct aic_irq_chip *irqc; > 2cf68211664acd Hector Martin 2022-03-10 906 const struct of_device_id *match; > 76cde26394114f Hector Martin 2021-01-21 907 > 76cde26394114f Hector Martin 2021-01-21 908 regs = of_iomap(node, 0); > 76cde26394114f Hector Martin 2021-01-21 909 if (WARN_ON(!regs)) > 76cde26394114f Hector Martin 2021-01-21 910 return -EIO; > 76cde26394114f Hector Martin 2021-01-21 911 > 76cde26394114f Hector Martin 2021-01-21 912 irqc = kzalloc(sizeof(*irqc), GFP_KERNEL); > 76cde26394114f Hector Martin 2021-01-21 913 if (!irqc) > 76cde26394114f Hector Martin 2021-01-21 914 return -ENOMEM; > 76cde26394114f Hector Martin 2021-01-21 915 > 76cde26394114f Hector Martin 2021-01-21 916 irqc->base = regs; > 76cde26394114f Hector Martin 2021-01-21 917 > 2cf68211664acd Hector Martin 2022-03-10 918 match = of_match_node(aic_info_match, node); > 2cf68211664acd Hector Martin 2022-03-10 919 if (!match) > 2cf68211664acd Hector Martin 2022-03-10 920 return -ENODEV; > 2cf68211664acd Hector Martin 2022-03-10 921 > 2cf68211664acd Hector Martin 2022-03-10 922 irqc->info = *(struct aic_info *)match->data; > 2cf68211664acd Hector Martin 2022-03-10 923 > 2cf68211664acd Hector Martin 2022-03-10 924 aic_irqc = irqc; > 2cf68211664acd Hector Martin 2022-03-10 925 > dc97fd6fec0099 Hector Martin 2022-03-10 926 switch (irqc->info.version) { > dc97fd6fec0099 Hector Martin 2022-03-10 927 case 1: { > dc97fd6fec0099 Hector Martin 2022-03-10 928 u32 info; > dc97fd6fec0099 Hector Martin 2022-03-10 929 > 76cde26394114f Hector Martin 2021-01-21 930 info = aic_ic_read(irqc, AIC_INFO); > 7c841f5f6fa3f9 Hector Martin 2022-03-10 931 irqc->nr_irq = FIELD_GET(AIC_INFO_NR_IRQ, info); > dc97fd6fec0099 Hector Martin 2022-03-10 932 irqc->max_irq = AIC_MAX_IRQ; > dc97fd6fec0099 Hector Martin 2022-03-10 933 > dc97fd6fec0099 Hector Martin 2022-03-10 934 off = irqc->info.target_cpu; > dc97fd6fec0099 Hector Martin 2022-03-10 935 off += sizeof(u32) * irqc->max_irq; /* TARGET_CPU */ > dc97fd6fec0099 Hector Martin 2022-03-10 936 > dc97fd6fec0099 Hector Martin 2022-03-10 937 break; > > "off" uninitialized if irqc->info.version != 1. Which is pretty much impossible by construction, as as of this particular commit, all the possible implementations have version == 1. Subsequent patches do add cases where version == 2, and that gets covered too. So unless I'm missing something obvious, there is no bug here. Thanks, M. -- Without deviation from the norm, progress is not possible.