From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C602920010C; Sat, 27 Sep 2025 16:13:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758989583; cv=none; b=pR4cle0SGXyCkrY1ynmdmb2OPGgVcNEbGiKDKHIpaEBuurBcSbOQMINmRDREVIYwM5jSwGMKrqxobzKcSf0TQ5Sr2PB5boLARn5zDWexSZdcr1lK/P1HvtZPQstsxzbE4lplSSRtD/eCNVEak6GAdBjm0q39EDIiYuDo1cCJBFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758989583; c=relaxed/simple; bh=RaymteuOKZEUhnbAncVV9vODp6Z0lvg1PkDxLDJB1Y4=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=BS9RuctELnizahdzaTgmRORntcGH2H8UtP3BLFnqWrximvIinf/Jz0x2oRj/FTnfgWKSHxlQAMZbK08ScC8xB7wxGp7wnt65Pq+sBvyDJKRQN7ftsYifO29ooBw99xDmSCTkVTIKSFiY0b8AduXtR28nhSdyFaEZstTPWL4V5vU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ShzUpli8; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ShzUpli8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1758989582; x=1790525582; h=date:from:to:cc:subject:message-id:mime-version; bh=RaymteuOKZEUhnbAncVV9vODp6Z0lvg1PkDxLDJB1Y4=; b=ShzUpli8S65I7QN9aUY+3Q/AUNlxRnavvsAd+/OUNicuSvwH8Tz0Mxvc TXD8KMKqz9y3Pv+PfhGQbQYdgUsP+1q9Co4qFaWWss6Od/3AyGddM4skl gVT9DCR+pyhuOd/xTAuX5U+6QtlDk+FZCdw1yGU+JrXoJcp2nptfmS8BR ncJTW0UMCyQkRj+dC9Nxh+PNkM8qUMugVsozN4WDoU1P+ua2wfokjARtU iq7fjaX2GnV/oSd4RrYS85Xm1lPB72jJRlGaDLWPersnxqQa/KiXykp/a +njOr7eIFN/ni1t/kbJsbaOOwBbnr7YGdf7WCSrmL+oWEKC3suKybCuNI A==; X-CSE-ConnectionGUID: 54g54qsvQuyJCnt7RN3PBw== X-CSE-MsgGUID: YQ9ZgmVESVq2nKDHdcavgQ== X-IronPort-AV: E=McAfee;i="6800,10657,11566"; a="63928294" X-IronPort-AV: E=Sophos;i="6.18,297,1751266800"; d="scan'208";a="63928294" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2025 09:13:01 -0700 X-CSE-ConnectionGUID: dsPeYiV6QpyX/Liw6LWgeQ== X-CSE-MsgGUID: YdtbPlm3QMCnBSqmPtAGYA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,297,1751266800"; d="scan'208";a="208591697" Received: from lkp-server02.sh.intel.com (HELO 84c55410ccf6) ([10.239.97.151]) by orviesa002.jf.intel.com with ESMTP; 27 Sep 2025 09:12:59 -0700 Received: from kbuild by 84c55410ccf6 with local (Exim 4.96) (envelope-from ) id 1v2XXd-0007B3-0H; Sat, 27 Sep 2025 16:12:57 +0000 Date: Sun, 28 Sep 2025 00:12:37 +0800 From: kernel test robot To: "Rafael J. Wysocki" Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org Subject: [rafael-pm:bleeding-edge 209/212] drivers/acpi/battery.c:1267:2: warning: label followed by a declaration is a C23 extension Message-ID: <202509280052.07wgnjdw-lkp@intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge head: 95b83771c9f38207ff42311ccc4739db76d19f33 commit: ef688d5100e8f263ae94a2c86260e7231d600c84 [209/212] ACPI: battery: Add synchronization between interface updates config: loongarch-randconfig-002-20250927 (https://download.01.org/0day-ci/archive/20250928/202509280052.07wgnjdw-lkp@intel.com/config) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250928/202509280052.07wgnjdw-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/202509280052.07wgnjdw-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/acpi/battery.c:1267:2: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] 1267 | guard(mutex)(&battery->update_lock); | ^ include/linux/cleanup.h:401:2: note: expanded from macro 'guard' 401 | CLASS(_name, __UNIQUE_ID(guard)) | ^ include/linux/cleanup.h:290:2: note: expanded from macro 'CLASS' 290 | class_##_name##_t var __cleanup(class_##_name##_destructor) = \ | ^ :77:1: note: expanded from here 77 | class_mutex_t | ^ 1 warning generated. vim +1267 drivers/acpi/battery.c 1212 1213 static int acpi_battery_add(struct acpi_device *device) 1214 { 1215 int result = 0; 1216 struct acpi_battery *battery; 1217 1218 if (!device) 1219 return -EINVAL; 1220 1221 if (device->dep_unmet) 1222 return -EPROBE_DEFER; 1223 1224 battery = devm_kzalloc(&device->dev, sizeof(*battery), GFP_KERNEL); 1225 if (!battery) 1226 return -ENOMEM; 1227 battery->device = device; 1228 strscpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); 1229 strscpy(acpi_device_class(device), ACPI_BATTERY_CLASS); 1230 device->driver_data = battery; 1231 result = devm_mutex_init(&device->dev, &battery->lock); 1232 if (result) 1233 return result; 1234 1235 result = devm_mutex_init(&device->dev, &battery->update_lock); 1236 if (result) 1237 return result; 1238 1239 if (acpi_has_method(battery->device->handle, "_BIX")) 1240 set_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags); 1241 1242 result = acpi_battery_update_retry(battery); 1243 if (result) 1244 goto fail; 1245 1246 pr_info("Slot [%s] (battery %s)\n", acpi_device_bid(device), 1247 device->status.battery_present ? "present" : "absent"); 1248 1249 battery->pm_nb.notifier_call = battery_notify; 1250 result = register_pm_notifier(&battery->pm_nb); 1251 if (result) 1252 goto fail; 1253 1254 device_init_wakeup(&device->dev, 1); 1255 1256 result = acpi_dev_install_notify_handler(device, ACPI_ALL_NOTIFY, 1257 acpi_battery_notify, device); 1258 if (result) 1259 goto fail_pm; 1260 1261 return 0; 1262 1263 fail_pm: 1264 device_init_wakeup(&device->dev, 0); 1265 unregister_pm_notifier(&battery->pm_nb); 1266 fail: > 1267 guard(mutex)(&battery->update_lock); 1268 1269 sysfs_remove_battery(battery); 1270 1271 return result; 1272 } 1273 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki