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 CC7A0C28B2B for ; Fri, 19 Aug 2022 16:15:23 +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=4m4bGvekvDfyrz0o8o/D58zkr6t3EOmIeuSTWY7IewA=; b=xXDqwCJH+qyLyx tNnjd89I5ZfUJS6B2u7pwKFCRKqyj0hEuYMHfKBhPu1scIDFP+SDrwxEeRLQxjuBYOK5NyYFjNM2R FtuM7DznL4lusBPfAfM79AExi4l82regljcdtt8f6vKM20ini4cl5zwantdG89Xl/AR2upgkkbhiv ZbRcFU/mfKJSE7X4qIpb08SRTgR3cVtRS+dhqMTr/VZAfmX7UjYEM4YLgDIQ0wK+IzRTi/56jR+6q HRcFWurRR6NPNFvOVntx3pYyD1Ybhg8dUHTCipWhS6s3MAeWT4JPnboIULxuLc3eLr9qTNt7fRUnd yVGCwOBGyBaYfZvb3pCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oP4dP-00AGAl-PO; Fri, 19 Aug 2022 16:14:11 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oP4dM-00AG7W-EG for linux-arm-kernel@lists.infradead.org; Fri, 19 Aug 2022 16:14:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660925648; x=1692461648; h=date:from:to:cc:subject:message-id:mime-version; bh=3zyMyyViZ38V2+IAPU2DotbRG1lk7Tv0ZYmWYpYiGAY=; b=Jo5Be7MYNfZInublH48V9TcmVlL++KAgVLwk2+fc4N/UzvdrRfjA+Y6l ja1KYMRQKB6peVHG5WpAwiYZkr+W4jjdMlmFAiTKNWAn0sUO0LOYxkutZ R7OnjxirV2eJhSSlCuepGwXSkkn5PedvTlcvhWCOkIS/Xr13PFgI4cuDb KnDfwWbVQQJyt2bN5YoZm9sRN/WtVEh3X66k1fktD7gVlbGo7itmIL6CV qcbHdBn3YpkUTKvLSFw4B5bHYheFI67kugp67RkSWepTLFcCzlKJeZGVO pdfMfYUVZ2tbxaIs6IwJY3jD23IGAOtAOLR2g3seDka4OVHuk5ojh4G2u g==; X-IronPort-AV: E=McAfee;i="6500,9779,10444"; a="291799912" X-IronPort-AV: E=Sophos;i="5.93,248,1654585200"; d="scan'208";a="291799912" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2022 09:14:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,248,1654585200"; d="scan'208";a="558997216" Received: from lkp-server01.sh.intel.com (HELO 44b6dac04a33) ([10.239.97.150]) by orsmga003.jf.intel.com with ESMTP; 19 Aug 2022 09:14:04 -0700 Received: from kbuild by 44b6dac04a33 with local (Exim 4.96) (envelope-from ) id 1oP4dH-0001bs-1A; Fri, 19 Aug 2022 16:14:03 +0000 Date: Sat, 20 Aug 2022 00:13:30 +0800 From: kernel test robot To: Linus Walleij Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org Subject: [linusw-nomadik:ux500-crypto 2/23] drivers/base/regmap/regmap-mmio.c:212:3: error: implicit declaration of function 'writesb' is invalid in C99 Message-ID: <202208200040.396noVHu-lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220819_091408_521092_1FB340F1 X-CRM114-Status: GOOD ( 15.37 ) 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 drivers/base/regmap/regmap-mmio.c tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-crypto head: e9f6e911556d816707ab4233a56c90ec7f7a02d6 commit: 91deaceb73222fa0316faff70737c98508f27c79 [2/23] regmap: mmio: Support accelerared noinc operations config: hexagon-randconfig-r045-20220819 (https://download.01.org/0day-ci/archive/20220820/202208200040.396noVHu-lkp@intel.com/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 0ac597f3cacf60479ffd36b03766fa7462dabd78) 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/linusw/linux-nomadik.git/commit/?id=91deaceb73222fa0316faff70737c98508f27c79 git remote add linusw-nomadik https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git git fetch --no-tags linusw-nomadik ux500-crypto git checkout 91deaceb73222fa0316faff70737c98508f27c79 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/base/regmap/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/base/regmap/regmap-mmio.c:212:3: error: implicit declaration of function 'writesb' is invalid in C99 [-Werror,-Wimplicit-function-declaration] writesb(ctx->regs + reg, (const u8 *)val, val_count); ^ drivers/base/regmap/regmap-mmio.c:212:3: note: did you mean 'writeb'? arch/hexagon/include/asm/io.h:122:20: note: 'writeb' declared here static inline void writeb(u8 data, volatile void __iomem *addr) ^ >> drivers/base/regmap/regmap-mmio.c:366:3: error: implicit declaration of function 'readsb' is invalid in C99 [-Werror,-Wimplicit-function-declaration] readsb(ctx->regs + reg, (u8 *)val, val_count); ^ drivers/base/regmap/regmap-mmio.c:366:3: note: did you mean 'readb'? arch/hexagon/include/asm/io.h:83:18: note: 'readb' declared here static inline u8 readb(const volatile void __iomem *addr) ^ 2 errors generated. vim +/writesb +212 drivers/base/regmap/regmap-mmio.c 163 164 static int regmap_mmio_noinc_write(void *context, unsigned int reg, 165 const void *val, size_t val_count) 166 { 167 struct regmap_mmio_context *ctx = context; 168 int ret = 0; 169 int i; 170 171 if (!IS_ERR(ctx->clk)) { 172 ret = clk_enable(ctx->clk); 173 if (ret < 0) 174 return ret; 175 } 176 177 /* 178 * There are no native, assembly-optimized write single register 179 * operations for big endian, so fall back to emulation if this 180 * is needed. (Single bytes are fine, they are not affected by 181 * endianness.) 182 */ 183 if (ctx->big_endian && (ctx->val_bytes > 1)) { 184 switch (ctx->val_bytes) { 185 case 2: 186 { 187 const u16 *valp = (const u16 *)val; 188 for (i = 0; i < val_count; i++) 189 iowrite16be(valp[i], ctx->regs + reg); 190 break; 191 } 192 case 4: 193 { 194 const u32 *valp = (const u32 *)val; 195 for (i = 0; i < val_count; i++) 196 iowrite32be(valp[i], ctx->regs + reg); 197 break; 198 } 199 #ifdef CONFIG_64BIT 200 case 8: 201 /* This is just too esoteric */ 202 fallthrough; 203 #endif 204 default: 205 ret = -EINVAL; 206 goto out_clk; 207 } 208 } 209 210 switch (ctx->val_bytes) { 211 case 1: > 212 writesb(ctx->regs + reg, (const u8 *)val, val_count); 213 break; 214 case 2: 215 writesw(ctx->regs + reg, (const u16 *)val, val_count); 216 break; 217 case 4: 218 writesl(ctx->regs + reg, (const u32 *)val, val_count); 219 break; 220 #ifdef CONFIG_64BIT 221 case 8: 222 writesq(ctx->regs + reg, (const u64 *)val, val_count); 223 break; 224 #endif 225 default: 226 ret = -EINVAL; 227 break; 228 } 229 230 out_clk: 231 if (!IS_ERR(ctx->clk)) 232 clk_disable(ctx->clk); 233 234 return ret; 235 } 236 237 static unsigned int regmap_mmio_read8(struct regmap_mmio_context *ctx, 238 unsigned int reg) 239 { 240 return readb(ctx->regs + reg); 241 } 242 243 static unsigned int regmap_mmio_read8_relaxed(struct regmap_mmio_context *ctx, 244 unsigned int reg) 245 { 246 return readb_relaxed(ctx->regs + reg); 247 } 248 249 static unsigned int regmap_mmio_read16le(struct regmap_mmio_context *ctx, 250 unsigned int reg) 251 { 252 return readw(ctx->regs + reg); 253 } 254 255 static unsigned int regmap_mmio_read16le_relaxed(struct regmap_mmio_context *ctx, 256 unsigned int reg) 257 { 258 return readw_relaxed(ctx->regs + reg); 259 } 260 261 static unsigned int regmap_mmio_read16be(struct regmap_mmio_context *ctx, 262 unsigned int reg) 263 { 264 return ioread16be(ctx->regs + reg); 265 } 266 267 static unsigned int regmap_mmio_read32le(struct regmap_mmio_context *ctx, 268 unsigned int reg) 269 { 270 return readl(ctx->regs + reg); 271 } 272 273 static unsigned int regmap_mmio_read32le_relaxed(struct regmap_mmio_context *ctx, 274 unsigned int reg) 275 { 276 return readl_relaxed(ctx->regs + reg); 277 } 278 279 static unsigned int regmap_mmio_read32be(struct regmap_mmio_context *ctx, 280 unsigned int reg) 281 { 282 return ioread32be(ctx->regs + reg); 283 } 284 285 #ifdef CONFIG_64BIT 286 static unsigned int regmap_mmio_read64le(struct regmap_mmio_context *ctx, 287 unsigned int reg) 288 { 289 return readq(ctx->regs + reg); 290 } 291 292 static unsigned int regmap_mmio_read64le_relaxed(struct regmap_mmio_context *ctx, 293 unsigned int reg) 294 { 295 return readq_relaxed(ctx->regs + reg); 296 } 297 #endif 298 299 static int regmap_mmio_read(void *context, unsigned int reg, unsigned int *val) 300 { 301 struct regmap_mmio_context *ctx = context; 302 int ret; 303 304 if (!IS_ERR(ctx->clk)) { 305 ret = clk_enable(ctx->clk); 306 if (ret < 0) 307 return ret; 308 } 309 310 *val = ctx->reg_read(ctx, reg); 311 312 if (!IS_ERR(ctx->clk)) 313 clk_disable(ctx->clk); 314 315 return 0; 316 } 317 318 static int regmap_mmio_noinc_read(void *context, unsigned int reg, 319 void *val, size_t val_count) 320 { 321 struct regmap_mmio_context *ctx = context; 322 int ret = 0; 323 int i; 324 325 if (!IS_ERR(ctx->clk)) { 326 ret = clk_enable(ctx->clk); 327 if (ret < 0) 328 return ret; 329 } 330 331 /* 332 * There are no native, assembly-optimized write single register 333 * operations for big endian, so fall back to emulation if this 334 * is needed. (Single bytes are fine, they are not affected by 335 * endianness.) 336 */ 337 if (ctx->big_endian && (ctx->val_bytes > 1)) { 338 switch (ctx->val_bytes) { 339 case 2: 340 { 341 u16 *valp = (u16 *)val; 342 for (i = 0; i < val_count; i++) 343 valp[i] = ioread16be(ctx->regs + reg); 344 break; 345 } 346 case 4: 347 { 348 u32 *valp = (u32 *)val; 349 for (i = 0; i < val_count; i++) 350 valp[i] = ioread32be(ctx->regs + reg); 351 break; 352 } 353 #ifdef CONFIG_64BIT 354 case 8: 355 /* This is just too esoteric */ 356 fallthrough; 357 #endif 358 default: 359 ret = -EINVAL; 360 goto out_clk; 361 } 362 } 363 364 switch (ctx->val_bytes) { 365 case 1: > 366 readsb(ctx->regs + reg, (u8 *)val, val_count); 367 break; 368 case 2: 369 readsw(ctx->regs + reg, (u16 *)val, val_count); 370 break; 371 case 4: 372 readsl(ctx->regs + reg, (u32 *)val, val_count); 373 break; 374 #ifdef CONFIG_64BIT 375 case 8: 376 readsq(ctx->regs + reg, (u64 *)val, val_count); 377 break; 378 #endif 379 default: 380 ret = -EINVAL; 381 break; 382 } 383 384 out_clk: 385 if (!IS_ERR(ctx->clk)) 386 clk_disable(ctx->clk); 387 388 return ret; 389 390 return 0; 391 } 392 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel