From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56714C4332F for ; Mon, 6 Nov 2023 15:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HkRKif+GYYJUKIvEoME8/X9dTU79Rr+/laSfe8m+2pc=; b=O8WFg4peK8Q0Ct bXpJWT1B0XRUaoyiL0R7uaNv3XKRdHzL1mSkkYgPCARHoJlXli/B+7eN0ertxm4yENr51HgHCCemw LuCswyNGIW97c5mFrKkXMPNoPmk5FS6+wrdK6CIVplJ2Q+O+vP3vIlV1XRiVMTg1RzwLjexHUyxyU aAQICLjPzLou6iykqXsEpUVREAtyTKQ6jj9p7Hg1fXgPKkotBmORSVZinf5p3cYWyIpdguQfCXWD/ lB5KRR+b2vTc59VW6tV+WyUC+KXUqNi851vsw6cESEACb5GJ3E90JklBQ5cjb1/RTreO192mUOfwH wniG1cnlXI4nH3zu3R7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r01Cg-00GxBt-2z; Mon, 06 Nov 2023 15:07:50 +0000 Received: from mgamail.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r01Cc-00GxAm-2w; Mon, 06 Nov 2023 15:07:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699283266; x=1730819266; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=HBna61a+8rIfPlKVfjaxNnwqpA7hlHdDJ4XgsD9bOdI=; b=AXlmyuLNZfozLgJA1QBfAivokrylyGdd5UthyOSRTnP2zR49A86CjzDW QmPY0YPZdEyisNhLabTOsrlPYN3NnFCf4tuM43sC6jgHHizxoakw0aKam b+iX/m7f0lg9+8Z0wQIKjtdBJo97r1pq0U7/8A3gk+tx523ma6EjlemLH 7ggIM2/UeC8NBcDS3kxydypO4DDIZ5H1Y9P09EaGVABTnZMkdpFnGNYI+ CIeDs8O5Um1fnRa7ckJM3kajwL/kQN5t78NikGEih0Ej9ad0eAmdc83Wu SoqFShgKKNREuOoSDuaAASOEcNSnEisv+gSYqDcN6mMdk6EOLLVCq6IY2 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="388172679" X-IronPort-AV: E=Sophos;i="6.03,281,1694761200"; d="scan'208";a="388172679" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 07:06:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="1093805687" X-IronPort-AV: E=Sophos;i="6.03,281,1694761200"; d="scan'208";a="1093805687" Received: from lkp-server01.sh.intel.com (HELO 17d9e85e5079) ([10.239.97.150]) by fmsmga005.fm.intel.com with ESMTP; 06 Nov 2023 07:06:40 -0800 Received: from kbuild by 17d9e85e5079 with local (Exim 4.96) (envelope-from ) id 1r01BV-0006Um-2K; Mon, 06 Nov 2023 15:06:37 +0000 Date: Mon, 6 Nov 2023 23:04:56 +0800 From: kernel test robot To: Artur Weber , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Liam Girdwood , Mark Brown Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Stanislav Jakubek , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Artur Weber Subject: Re: [PATCH 5/6] regulator: bcm590xx: Add support for BCM59054 Message-ID: <202311062220.2gWiPqvR-lkp@intel.com> References: <20231030-bcm59054-v1-5-3517f980c1e3@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231030-bcm59054-v1-5-3517f980c1e3@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231106_070746_965252_5E51E398 X-CRM114-Status: GOOD ( 15.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Artur, kernel test robot noticed the following build warnings: [auto build test WARNING on 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1] url: https://github.com/intel-lab-lkp/linux/commits/Artur-Weber/dt-bindings-mfd-brcm-bcm59056-Convert-to-YAML/20231031-040046 base: 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1 patch link: https://lore.kernel.org/r/20231030-bcm59054-v1-5-3517f980c1e3%40gmail.com patch subject: [PATCH 5/6] regulator: bcm590xx: Add support for BCM59054 config: powerpc64-allyesconfig (https://download.01.org/0day-ci/archive/20231106/202311062220.2gWiPqvR-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231106/202311062220.2gWiPqvR-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202311062220.2gWiPqvR-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/regulator/bcm590xx-regulator.c:591:13: warning: variable 'n_regulators' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 591 | } else if (pmu->mfd->device_type == BCM59056_TYPE) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/bcm590xx-regulator.c:597:6: note: uninitialized use occurs here 597 | n_regulators, | ^~~~~~~~~~~~ drivers/regulator/bcm590xx-regulator.c:591:9: note: remove the 'if' if its condition is always true 591 | } else if (pmu->mfd->device_type == BCM59056_TYPE) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/bcm590xx-regulator.c:577:18: note: initialize the variable 'n_regulators' to silence this warning 577 | int n_regulators; | ^ | = 0 1 warning generated. vim +591 drivers/regulator/bcm590xx-regulator.c 569 570 static int bcm590xx_probe(struct platform_device *pdev) 571 { 572 struct bcm590xx *bcm590xx = dev_get_drvdata(pdev->dev.parent); 573 struct bcm590xx_reg *pmu; 574 struct regulator_config config = { }; 575 struct bcm590xx_info *info; 576 struct regulator_dev *rdev; 577 int n_regulators; 578 int i; 579 580 pmu = devm_kzalloc(&pdev->dev, sizeof(*pmu), GFP_KERNEL); 581 if (!pmu) 582 return -ENOMEM; 583 584 pmu->mfd = bcm590xx; 585 586 platform_set_drvdata(pdev, pmu); 587 588 if (pmu->mfd->device_type == BCM59054_TYPE) { 589 info = bcm59054_regs; 590 n_regulators = BCM59054_NUM_REGS; > 591 } else if (pmu->mfd->device_type == BCM59056_TYPE) { 592 info = bcm59056_regs; 593 n_regulators = BCM59056_NUM_REGS; 594 } 595 596 pmu->desc = devm_kcalloc(&pdev->dev, 597 n_regulators, 598 sizeof(struct regulator_desc), 599 GFP_KERNEL); 600 if (!pmu->desc) 601 return -ENOMEM; 602 603 /* Register the regulators */ 604 for (i = 0; i < n_regulators; i++, info++) { 605 pmu->desc[i].name = info->name; 606 pmu->desc[i].of_match = of_match_ptr(info->name); 607 pmu->desc[i].regulators_node = of_match_ptr("regulators"); 608 pmu->desc[i].supply_name = info->vin_name; 609 pmu->desc[i].id = i; 610 pmu->desc[i].volt_table = info->volt_table; 611 pmu->desc[i].n_voltages = info->n_voltages; 612 pmu->desc[i].linear_ranges = info->linear_ranges; 613 pmu->desc[i].n_linear_ranges = info->n_linear_ranges; 614 615 if (bcm590xx_reg_is_ldo(pmu, i) || \ 616 bcm590xx_reg_is_gpldo(pmu, i)) { 617 pmu->desc[i].ops = &bcm590xx_ops_ldo; 618 pmu->desc[i].vsel_mask = BCM590XX_LDO_VSEL_MASK; 619 } else if (bcm590xx_reg_is_static(pmu, i)) { 620 pmu->desc[i].ops = &bcm590xx_ops_static; 621 } else { 622 pmu->desc[i].ops = &bcm590xx_ops_dcdc; 623 pmu->desc[i].vsel_mask = BCM590XX_SR_VSEL_MASK; 624 } 625 626 if (bcm590xx_reg_is_vbus(pmu, i)) { 627 pmu->desc[i].enable_mask = BCM590XX_VBUS_ENABLE; 628 } else { 629 pmu->desc[i].vsel_reg = \ 630 bcm590xx_get_vsel_register(pmu, i); 631 pmu->desc[i].enable_mask = \ 632 bcm590xx_get_enable_mask(pmu, i); 633 pmu->desc[i].enable_is_inverted = true; 634 } 635 pmu->desc[i].enable_reg = \ 636 bcm590xx_get_enable_register(pmu, i); 637 pmu->desc[i].type = REGULATOR_VOLTAGE; 638 pmu->desc[i].owner = THIS_MODULE; 639 640 config.dev = pmu->mfd->dev; 641 config.driver_data = pmu; 642 if (bcm590xx_reg_is_secondary(pmu, i)) 643 config.regmap = pmu->mfd->regmap_sec; 644 else 645 config.regmap = pmu->mfd->regmap_pri; 646 647 rdev = devm_regulator_register(&pdev->dev, &pmu->desc[i], 648 &config); 649 if (IS_ERR(rdev)) { 650 dev_err(bcm590xx->dev, 651 "failed to register %s regulator\n", 652 pdev->name); 653 return PTR_ERR(rdev); 654 } 655 } 656 657 return 0; 658 } 659 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel