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 D88A9C433EF for ; Mon, 31 Jan 2022 18:15:17 +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:MIME-Version: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:In-Reply-To:References: List-Owner; bh=OHTo1RWbaH4MbVR/sVQxWqihf1lgNb+Tj53bB33ON/k=; b=xuMdrTXtiCgiYu FEFxRITP0/ZB+9HXVX/UykbO5SOQPDFgVci5hBYMWVGM2M1pmJOqubvRkoTUgG9xrdkSohmyXNCta vhCnmbbKl8UPVikUMKCSgvodw051jG+BQiKi+5HGKrSi/5R1beNiQKGx/xQceyV0+xTwXZzKPWpps E3LIEW6p0+gabkdcJYQxj6HdUORddsyfqTfrPwHhnm634NualtF60nTrj5FJdQVc4viFLyLLhAQIr O3lev0R63eqgZ7BBiFLU+PCj6q//N79PCpH6lj724CKIDUmdeBKbyZWOIofnkug4MjkVKS31+mJ3L gATDB+qC9Y/XzIQF7vAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEbBT-00AHsT-6E; Mon, 31 Jan 2022 18:13:47 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEbBP-00AHry-OR for linux-arm-kernel@lists.infradead.org; Mon, 31 Jan 2022 18:13:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643652823; x=1675188823; h=date:from:to:cc:subject:message-id:mime-version; bh=cgVaFwcYyHWYVNMB9ysr9S9GNQVAxmMBpMm2rkh2R80=; b=WN5ruO9yT3RuNklDsNwFUy50CUTuHa7ZvxFPIliyiwkDvhFJrB4a32Is eXOqQ9yxBU/7pKjuZAdHDA6oIahpjkXf+Z/m0e8mzhhWOpzXL+3XML251 DOoN7zVWrbFmBV4qXe4Fv3McBH7OAiOtcXIz+pDVBEvsefNj7h2FI0DUe DTX4FxQpQT4Ih7XwFKISQ+q3GvZ/7MuYzZAoJWeSbvkvcszmU0X3MIYAY yJs47b5yZaUjRtWskMn+OjVZpnIcwV7kes30eAclOARM+cxnALOBzJnCA B5dTvpJ8DTVBULwgsiiEmhZyoF+IHzPeQyWtUGUmEtgJNvCNojMfCgvt4 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10244"; a="247290884" X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="247290884" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2022 10:13:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="630108752" Received: from lkp-server01.sh.intel.com (HELO 276f1b88eecb) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 31 Jan 2022 10:13:41 -0800 Received: from kbuild by 276f1b88eecb with local (Exim 4.92) (envelope-from ) id 1nEbBN-000SDw-95; Mon, 31 Jan 2022 18:13:41 +0000 Date: Tue, 1 Feb 2022 02:12:42 +0800 From: kernel test robot To: Marc Zyngier Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org Subject: [arm-platforms:irq/irq_chip_ro 10/20] drivers/gpio/gpio-mt7621.c:194:59: error: incompatible type for argument 1 of 'irq_data_get_irq_chip_data' Message-ID: <202202010250.5vu2hNPa-lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220131_101343_877782_21492757 X-CRM114-Status: GOOD ( 22.28 ) 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 tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/irq_chip_ro head: 3feae85f6c2365d60a02d167b72a3e7410f82160 commit: a2c5a576e1b1c539e3676c024c67a3c2acfe8852 [10/20] gpio: mt7621: Switch to dynamic chip name output config: riscv-randconfig-r042-20220130 (https://download.01.org/0day-ci/archive/20220201/202202010250.5vu2hNPa-lkp@intel.com/config) compiler: riscv64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=a2c5a576e1b1c539e3676c024c67a3c2acfe8852 git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git git fetch --no-tags arm-platforms irq/irq_chip_ro git checkout a2c5a576e1b1c539e3676c024c67a3c2acfe8852 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpio/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): drivers/gpio/gpio-mt7621.c: In function 'mediatek_irq_print_chip': >> drivers/gpio/gpio-mt7621.c:194:59: error: incompatible type for argument 1 of 'irq_data_get_irq_chip_data' 194 | struct gpio_chip *gc = irq_data_get_irq_chip_data(d); | ^ | | | struct irq_data In file included from include/linux/gpio/driver.h:7, from drivers/gpio/gpio-mt7621.c:8: include/linux/irq.h:834:65: note: expected 'struct irq_data *' but argument is of type 'struct irq_data' 834 | static inline void *irq_data_get_irq_chip_data(struct irq_data *d) | ~~~~~~~~~~~~~~~~~^ >> drivers/gpio/gpio-mt7621.c:198:29: error: implicit declaration of function 'devname'; did you mean 'dev_name'? [-Werror=implicit-function-declaration] 198 | seq_printf(p, "%s", devname(mtk->dev)); | ^~~~~~~ | dev_name >> drivers/gpio/gpio-mt7621.c:198:25: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat=] 198 | seq_printf(p, "%s", devname(mtk->dev)); | ~^ ~~~~~~~~~~~~~~~~~ | | | | | int | char * | %d drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_bank_probe': >> drivers/gpio/gpio-mt7621.c:256:39: error: 'mediatek_gpio_irq_print_chip' undeclared (first use in this function); did you mean 'mediatek_irq_print_chip'? 256 | rg->irq_chip.irq_print_chip = mediatek_gpio_irq_print_chip; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | mediatek_irq_print_chip drivers/gpio/gpio-mt7621.c:256:39: note: each undeclared identifier is reported only once for each function it appears in At top level: drivers/gpio/gpio-mt7621.c:192:13: warning: 'mediatek_irq_print_chip' defined but not used [-Wunused-function] 192 | static void mediatek_irq_print_chip(struct irq_data d, struct seq_file *p) | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/irq_data_get_irq_chip_data +194 drivers/gpio/gpio-mt7621.c 191 192 static void mediatek_irq_print_chip(struct irq_data d, struct seq_file *p) 193 { > 194 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 195 struct mtk_gc *rg = to_mediatek_gpio(gc); 196 struct mtk *mtk = container_of(rg - rg->bank, struct mtk, gc_map[0]); 197 > 198 seq_printf(p, "%s", devname(mtk->dev)); 199 } 200 201 static int 202 mediatek_gpio_xlate(struct gpio_chip *chip, 203 const struct of_phandle_args *spec, u32 *flags) 204 { 205 int gpio = spec->args[0]; 206 struct mtk_gc *rg = to_mediatek_gpio(chip); 207 208 if (rg->bank != gpio / MTK_BANK_WIDTH) 209 return -EINVAL; 210 211 if (flags) 212 *flags = spec->args[1]; 213 214 return gpio % MTK_BANK_WIDTH; 215 } 216 217 static int 218 mediatek_gpio_bank_probe(struct device *dev, int bank) 219 { 220 struct mtk *mtk = dev_get_drvdata(dev); 221 struct mtk_gc *rg; 222 void __iomem *dat, *set, *ctrl, *diro; 223 int ret; 224 225 rg = &mtk->gc_map[bank]; 226 memset(rg, 0, sizeof(*rg)); 227 228 spin_lock_init(&rg->lock); 229 rg->bank = bank; 230 231 dat = mtk->base + GPIO_REG_DATA + (rg->bank * GPIO_BANK_STRIDE); 232 set = mtk->base + GPIO_REG_DSET + (rg->bank * GPIO_BANK_STRIDE); 233 ctrl = mtk->base + GPIO_REG_DCLR + (rg->bank * GPIO_BANK_STRIDE); 234 diro = mtk->base + GPIO_REG_CTRL + (rg->bank * GPIO_BANK_STRIDE); 235 236 ret = bgpio_init(&rg->chip, dev, 4, dat, set, ctrl, diro, NULL, 237 BGPIOF_NO_SET_ON_INPUT); 238 if (ret) { 239 dev_err(dev, "bgpio_init() failed\n"); 240 return ret; 241 } 242 243 rg->chip.of_gpio_n_cells = 2; 244 rg->chip.of_xlate = mediatek_gpio_xlate; 245 rg->chip.label = devm_kasprintf(dev, GFP_KERNEL, "%s-bank%d", 246 dev_name(dev), bank); 247 if (!rg->chip.label) 248 return -ENOMEM; 249 250 rg->chip.offset = bank * MTK_BANK_WIDTH; 251 rg->irq_chip.parent_device = dev; 252 rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask; 253 rg->irq_chip.irq_mask = mediatek_gpio_irq_mask; 254 rg->irq_chip.irq_mask_ack = mediatek_gpio_irq_mask; 255 rg->irq_chip.irq_set_type = mediatek_gpio_irq_type; > 256 rg->irq_chip.irq_print_chip = mediatek_gpio_irq_print_chip; 257 258 if (mtk->gpio_irq) { 259 struct gpio_irq_chip *girq; 260 261 /* 262 * Directly request the irq here instead of passing 263 * a flow-handler because the irq is shared. 264 */ 265 ret = devm_request_irq(dev, mtk->gpio_irq, 266 mediatek_gpio_irq_handler, IRQF_SHARED, 267 rg->chip.label, &rg->chip); 268 269 if (ret) { 270 dev_err(dev, "Error requesting IRQ %d: %d\n", 271 mtk->gpio_irq, ret); 272 return ret; 273 } 274 275 girq = &rg->chip.irq; 276 girq->chip = &rg->irq_chip; 277 /* This will let us handle the parent IRQ in the driver */ 278 girq->parent_handler = NULL; 279 girq->num_parents = 0; 280 girq->parents = NULL; 281 girq->default_type = IRQ_TYPE_NONE; 282 girq->handler = handle_simple_irq; 283 } 284 285 ret = devm_gpiochip_add_data(dev, &rg->chip, mtk); 286 if (ret < 0) { 287 dev_err(dev, "Could not register gpio %d, ret=%d\n", 288 rg->chip.ngpio, ret); 289 return ret; 290 } 291 292 /* set polarity to low for all gpios */ 293 mtk_gpio_w32(rg, GPIO_REG_POL, 0); 294 295 dev_info(dev, "registering %d gpios\n", rg->chip.ngpio); 296 297 return 0; 298 } 299 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel