Skip to contentSkip to conversation

drivers/platform/chrome/cros_ec_sysfs.c:355:32-49: opportunity for str_yes_no(ap_driven_altmode) (fwd)

PATCH New Julia Lawall 1 participant 1 message May 30, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/platform/chrome/cros_ec_sysfs.c:355:32-49: opportunity for str_yes_no(ap_driven_altmode) (fwd)

---------- Forwarded message ----------
Date: Fri, 30 May 2025 11:15:56 +0800
From: kernel test robot <[email protected]>
To: [email protected]
Cc: [email protected], Julia Lawall <[email protected]>
Subject: [android-common:android16-6.12-desktop 1/1]

    drivers/platform/chrome/cros_ec_sysfs.c:355:32-49: opportunity for
    str_yes_no(ap_driven_altmode)

BCC: [email protected]
CC: [email protected]
TO: [email protected]

tree:   https://android.googlesource.com/kernel/common android16-6.12-desktop
head:   e3e18291d3d62133d3ef23cb34a4eb0919a36a77
commit: dc2136f8c4ed409eb2d06722cc0a3f5a06746095 [1/1] UPSTREAM: platform/chrome: cros_ec_sysfs: Expose AP_MODE_ENTRY feature state

:::::: branch date: 17 hours ago
:::::: commit date: 5 weeks ago
config: x86_64-randconfig-r053-20250530 (https://download.01.org/0day-ci/archive/20250530/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)

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 <[email protected]>
| Reported-by: Julia Lawall <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

cocci warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/platform/chrome/cros_ec_sysfs.c:355:32-49: opportunity for str_yes_no(ap_driven_altmode)

vim +355 drivers/platform/chrome/cros_ec_sysfs.c

1f15db8c29906d Andrei Kuchynski 2025-02-03  347
dc2136f8c4ed40 Andrei Kuchynski 2025-02-03  348  static ssize_t ap_mode_entry_show(struct device *dev,
dc2136f8c4ed40 Andrei Kuchynski 2025-02-03  349  			      struct device_attribute *attr, char *buf)
dc2136f8c4ed40 Andrei Kuchynski 2025-02-03  350  {
dc2136f8c4ed40 Andrei Kuchynski 2025-02-03  351  	struct cros_ec_dev *ec = to_cros_ec_dev(dev);
dc2136f8c4ed40 Andrei Kuchynski 2025-02-03  352  	const bool ap_driven_altmode = cros_ec_check_features(
dc2136f8c4ed40 Andrei Kuchynski 2025-02-03  353  		ec, EC_FEATURE_TYPEC_REQUIRE_AP_MODE_ENTRY);
dc2136f8c4ed40 Andrei Kuchynski 2025-02-03  354

dc2136f8c4ed40 Andrei Kuchynski 2025-02-03 @355 return sysfs_emit(buf, "%s\n", ap_driven_altmode ? "yes" : "no");
dc2136f8c4ed40 Andrei Kuchynski 2025-02-03 356 } dc2136f8c4ed40 Andrei Kuchynski 2025-02-03 357

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki