Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1549840rwb; Wed, 16 Nov 2022 20:45:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf5r5/nuS6nM9ZjVYMvCHZFTmJ9jK9wfyOjjEbwRXLIPol6HkL1zUIycQ2TCekJjoFv+L7kg X-Received: by 2002:a17:907:1303:b0:78d:ee08:1867 with SMTP id vj3-20020a170907130300b0078dee081867mr820837ejb.123.1668660350066; Wed, 16 Nov 2022 20:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668660350; cv=none; d=google.com; s=arc-20160816; b=CGLbUO/pGjfjPv/yCQG9FZRsCZucJ5xcxm2O0w3YihmnE41KpVfEFCYe+9ZkFz+DNl vIlS2lz2to48aaPBnq+50D3yub2wxkAtJzOIyFae9YE/uaN06nLrFjdgry0jWiuEDcTg JxrOWbnmsgsbG1/gpfWlPuspnFfxUJNYlZoD8BTHva75hEv98vTtwSsdVY84hDzqHYbD 5haKvmCFhyj87XkshWSDGxGtz2ZVxv0jRe2Hy+fOevpcoDIYOMA78zPr1Y4bDjHJVVcs FfbIybLnRaap3dQQ1tcT2jIUDwjC6x2piE9Qpt+rPJBd9jsE4+lOf6rrxrQffiSayY5L 8SMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=gM3PtvPAdYS2cL7GwLPhGFEGDIfhNGK5xW1YKSqAlqI=; b=fHr+cJZrp1KIMNwhdPmMfI7OqHvCzwl7lgCL7mFEFhwzg+BuilVk+npxDE0oMpyP+7 AOQrBucDBJoqnD8Q/3nF34+h6RQy/5Gx4MvFcV1RxXR4BEINNNQgkLEWae5lP5dBmRLN EQBz5rahQ1ERWO5sh/bq5mI5p4FjWd9evEazdY8QXJV9+FS//atr506ZkzfuejtC/v+J 1wwhEd+Jdavz2q+3HokKn6GbtkznfUXzHIvie/KaZ8UR//FgVrFN5cmtdVvcZ7uVzl9c KoeZoyB/XcfysTpjAHBPCOD8FKPLUr8elLAOc1yvnQgAGfiFBLHQjZ3Js0O9ZEnhjNAI dA3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=i7enR9Mn; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb4-20020a1709071c8400b007ae29da29b3si16488648ejc.731.2022.11.16.20.45.28; Wed, 16 Nov 2022 20:45:50 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=i7enR9Mn; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234615AbiKQEMc (ORCPT + 90 others); Wed, 16 Nov 2022 23:12:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233151AbiKQEM3 (ORCPT ); Wed, 16 Nov 2022 23:12:29 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 550B432B8F; Wed, 16 Nov 2022 20:12:28 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id d9so1315708wrm.13; Wed, 16 Nov 2022 20:12:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gM3PtvPAdYS2cL7GwLPhGFEGDIfhNGK5xW1YKSqAlqI=; b=i7enR9MnStHWDiFeKdWX5LPhsTsRCxiq4GaJlWfecj34xt3cMfTeP5VYwZDz6BN8Go zSiJFITJaa8RhwWFtQbjfwImn4uf4edOeMNSxLLCSf1EtIL4u35IqKUBrTFIo0HbgjJj p3HKVQCzMGWvF4CtF4c3CIWbYkQ0oySnBoxQWk9ZxHEkcFJxPhS1M4x93CDzXFEVhLDG E0IDec710zT71gTUlNXEJtC21QZ/Kc1MPeTw8rfEY4tgiP88EEcnq1kxDl73Xkc19tqy MZsOGkrFHml4Z7oJevYDpGdpPyip1H8o9zhTT9dLDs9EcOUbH2k+3NCtNufvFbPPQRPL p9QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gM3PtvPAdYS2cL7GwLPhGFEGDIfhNGK5xW1YKSqAlqI=; b=6vxONInLDykO5W+JJw/VPR3xluYAxCe4A7JMxViAx1ZGDtmyG8it+80V64A+AEzwH6 /4Qz23/XEi2p3f3nDnljqSiSql13esiwe72YMI+XH15vOJ6nQAnh/3ec/y64Hs7KX3Nk LBhd0GLQ90iAXQlM/dD0OMbdbKsyAQSeogizMJPajNg+WzznCUtObzaoef1lo8o+WwJy 6q8jDp/+hY8+2C9xt3jWXAOv+yFd0FjvxvWqKHXxyvZOkw06u+OWdWU82hs7sYfefSGi 1B4APbnP0sCC/bgHGSV8mD14daiECrcRoXyUBVUI7j48MpYbo936nJ2Z2PjLIvwcAt3b ZrGw== X-Gm-Message-State: ANoB5pmNpyHcwYIBRKVCgm2QkqYSGAQgV/rrrT0D0CJrdlp3hjg2vGS+ tQ/zQBwd8YvvxJ9I8zEezAQ= X-Received: by 2002:adf:d84c:0:b0:236:6f1a:955 with SMTP id k12-20020adfd84c000000b002366f1a0955mr283056wrl.111.1668658346920; Wed, 16 Nov 2022 20:12:26 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id x11-20020a5d54cb000000b002415dd45320sm16479931wrv.112.2022.11.16.20.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 20:12:26 -0800 (PST) Date: Thu, 17 Nov 2022 07:12:24 +0300 From: Dan Carpenter To: oe-kbuild@lists.linux.dev, Liu Peibao , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Jiaxun Yang Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, chenhuacai@loongson.cn, lvjianmin@loongson.cn, zhuyinbo@loongson.cn, liupeibao@loongson.cn, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] PCI: loongson: add skip-scan property for child DT node Message-ID: <202211160131.oycRMuJQ-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221103090040.836-1-liupeibao@loongson.cn> X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Hi Liu, https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Liu-Peibao/PCI-loongson-add-skip-scan-property-for-child-DT-node/20221103-170125 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next patch link: https://lore.kernel.org/r/20221103090040.836-1-liupeibao%40loongson.cn patch subject: [PATCH 1/2] PCI: loongson: add skip-scan property for child DT node config: loongarch-randconfig-m041-20221114 compiler: loongarch64-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Dan Carpenter smatch warnings: drivers/pci/controller/pci-loongson.c:257 setup_masklist() error: not allocating enough for = 'entry' 24 vs 8 vim +/entry +257 drivers/pci/controller/pci-loongson.c f93e71fb8e65ba Liu Peibao 2022-11-03 242 static int setup_masklist(struct loongson_pci *priv) f93e71fb8e65ba Liu Peibao 2022-11-03 243 { f93e71fb8e65ba Liu Peibao 2022-11-03 244 struct device *dev = &priv->pdev->dev; f93e71fb8e65ba Liu Peibao 2022-11-03 245 struct device_node *dn, *parent = dev->of_node; f93e71fb8e65ba Liu Peibao 2022-11-03 246 struct mask_entry *entry; f93e71fb8e65ba Liu Peibao 2022-11-03 247 int devfn; f93e71fb8e65ba Liu Peibao 2022-11-03 248 f93e71fb8e65ba Liu Peibao 2022-11-03 249 INIT_LIST_HEAD(&priv->masklist); f93e71fb8e65ba Liu Peibao 2022-11-03 250 f93e71fb8e65ba Liu Peibao 2022-11-03 251 for_each_child_of_node(parent, dn) { f93e71fb8e65ba Liu Peibao 2022-11-03 252 if (of_property_read_bool(dn, "skip-scan")) { f93e71fb8e65ba Liu Peibao 2022-11-03 253 devfn = of_pci_get_devfn(dn); f93e71fb8e65ba Liu Peibao 2022-11-03 254 if (devfn < 0) f93e71fb8e65ba Liu Peibao 2022-11-03 255 continue; f93e71fb8e65ba Liu Peibao 2022-11-03 256 f93e71fb8e65ba Liu Peibao 2022-11-03 @257 entry = devm_kzalloc(dev, sizeof(entry), GFP_KERNEL); ^^^^^^^^^^^^^ Should be sizeof(*entry) f93e71fb8e65ba Liu Peibao 2022-11-03 258 if (!entry) f93e71fb8e65ba Liu Peibao 2022-11-03 259 return -ENOMEM; f93e71fb8e65ba Liu Peibao 2022-11-03 260 f93e71fb8e65ba Liu Peibao 2022-11-03 261 entry->devfn = devfn; f93e71fb8e65ba Liu Peibao 2022-11-03 262 list_add_tail(&entry->entry, &priv->masklist); f93e71fb8e65ba Liu Peibao 2022-11-03 263 } f93e71fb8e65ba Liu Peibao 2022-11-03 264 } f93e71fb8e65ba Liu Peibao 2022-11-03 265 f93e71fb8e65ba Liu Peibao 2022-11-03 266 return 0; f93e71fb8e65ba Liu Peibao 2022-11-03 267 } -- 0-DAY CI Kernel Test Service https://01.org/lkp