* [PATCH 0/5] Cleanups for ACPI APD driver
@ 2020-09-07 8:56 Hanjun Guo
2020-09-07 8:56 ` [PATCH 1/5] ACPI / APD: Add kernel doc for the properties in struct apd_device_desc Hanjun Guo
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Hanjun Guo @ 2020-09-07 8:56 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-acpi, Ken Xue, Hanjun Guo
ACPI APD driver has some unused code and some mis-behaved
kernel doc, make a cleanup for this driver.
Tested on Hisilicon ARM64, and compile tested on Intel x86.
Hanjun Guo (5):
ACPI / APD: Add kernel doc for the properties in struct
apd_device_desc
ACPI / APD: Remove the flags in struct apd_device_desc
ACPI / APD: Remove ACPI_MODULE_NAME()
ACPI / APD: Remove the unneeded APD_ADDR(desc) macro define
ACPI / APD: Head file including cleanups
drivers/acpi/acpi_apd.c | 34 ++++++++--------------------------
1 file changed, 8 insertions(+), 26 deletions(-)
--
1.7.12.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/5] ACPI / APD: Add kernel doc for the properties in struct apd_device_desc
2020-09-07 8:56 [PATCH 0/5] Cleanups for ACPI APD driver Hanjun Guo
@ 2020-09-07 8:56 ` Hanjun Guo
2020-09-07 8:56 ` [PATCH 2/5] ACPI / APD: Remove the flags " Hanjun Guo
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Hanjun Guo @ 2020-09-07 8:56 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-acpi, Ken Xue, Hanjun Guo
commit 7ff55d174cbf ("ACPI / APD: Provide build-in properties of the
UART") add the 'struct property_entry *properties' in struct
apd_device_desc but didn't add the kernel doc, add it now.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
drivers/acpi/acpi_apd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 4c34837..6f39289 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -34,6 +34,7 @@
* @flags: device flags like %ACPI_APD_SYSFS, %ACPI_APD_PM
* @fixed_clk_rate: fixed rate input clock source for acpi device;
* 0 means no fixed rate input clock source
+ * @properties: build-in properties of the device such as UART
* @setup: a hook routine to set device resource during create platform device
*
* Device description defined as acpi_device_id.driver_data
--
1.7.12.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/5] ACPI / APD: Remove the flags in struct apd_device_desc
2020-09-07 8:56 [PATCH 0/5] Cleanups for ACPI APD driver Hanjun Guo
2020-09-07 8:56 ` [PATCH 1/5] ACPI / APD: Add kernel doc for the properties in struct apd_device_desc Hanjun Guo
@ 2020-09-07 8:56 ` Hanjun Guo
2020-09-07 8:56 ` [PATCH 3/5] ACPI / APD: Remove ACPI_MODULE_NAME() Hanjun Guo
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Hanjun Guo @ 2020-09-07 8:56 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-acpi, Ken Xue, Hanjun Guo
The flags is not used in anywhere, remove it and its related
code.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
drivers/acpi/acpi_apd.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 6f39289..c4bc4ab 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -23,15 +23,7 @@
struct apd_private_data;
/**
- * ACPI_APD_SYSFS : add device attributes in sysfs
- * ACPI_APD_PM : attach power domain to device
- */
-#define ACPI_APD_SYSFS BIT(0)
-#define ACPI_APD_PM BIT(1)
-
-/**
* struct apd_device_desc - a descriptor for apd device
- * @flags: device flags like %ACPI_APD_SYSFS, %ACPI_APD_PM
* @fixed_clk_rate: fixed rate input clock source for acpi device;
* 0 means no fixed rate input clock source
* @properties: build-in properties of the device such as UART
@@ -40,7 +32,6 @@
* Device description defined as acpi_device_id.driver_data
*/
struct apd_device_desc {
- unsigned int flags;
unsigned int fixed_clk_rate;
struct property_entry *properties;
int (*setup)(struct apd_private_data *pdata);
--
1.7.12.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/5] ACPI / APD: Remove ACPI_MODULE_NAME()
2020-09-07 8:56 [PATCH 0/5] Cleanups for ACPI APD driver Hanjun Guo
2020-09-07 8:56 ` [PATCH 1/5] ACPI / APD: Add kernel doc for the properties in struct apd_device_desc Hanjun Guo
2020-09-07 8:56 ` [PATCH 2/5] ACPI / APD: Remove the flags " Hanjun Guo
@ 2020-09-07 8:56 ` Hanjun Guo
2020-09-07 8:56 ` [PATCH 4/5] ACPI / APD: Remove the unneeded APD_ADDR(desc) macro define Hanjun Guo
2020-09-07 8:56 ` [PATCH 5/5] ACPI / APD: Head file including cleanups Hanjun Guo
4 siblings, 0 replies; 10+ messages in thread
From: Hanjun Guo @ 2020-09-07 8:56 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-acpi, Ken Xue, Hanjun Guo
ACPI_MODULE_NAME() is used for ACPI debug output when using
ACPI debug print functions, but ACPI debug print functions are
not used in acpi_apd.c, remove the ACPI_MODULE_NAME().
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
drivers/acpi/acpi_apd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index c4bc4ab..4dbf85b 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -19,7 +19,6 @@
#include "internal.h"
-ACPI_MODULE_NAME("acpi_apd");
struct apd_private_data;
/**
--
1.7.12.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/5] ACPI / APD: Remove the unneeded APD_ADDR(desc) macro define
2020-09-07 8:56 [PATCH 0/5] Cleanups for ACPI APD driver Hanjun Guo
` (2 preceding siblings ...)
2020-09-07 8:56 ` [PATCH 3/5] ACPI / APD: Remove ACPI_MODULE_NAME() Hanjun Guo
@ 2020-09-07 8:56 ` Hanjun Guo
2020-09-07 8:56 ` [PATCH 5/5] ACPI / APD: Head file including cleanups Hanjun Guo
4 siblings, 0 replies; 10+ messages in thread
From: Hanjun Guo @ 2020-09-07 8:56 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-acpi, Ken Xue, Hanjun Guo
Since APD_ADDR(desc) is only used when CONFIG_X86_AMD_PLATFORM_DEVICE or
CONFIG_ARM64 is set, no need for the redundant
'#define APD_ADDR(desc) (0UL)', remove it.
Also update the comments for #endif.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
drivers/acpi/acpi_apd.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 4dbf85b..561d9ba 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -62,7 +62,6 @@ static int acpi_apd_setup(struct apd_private_data *pdata)
}
#ifdef CONFIG_X86_AMD_PLATFORM_DEVICE
-
static int misc_check_res(struct acpi_resource *ares, void *data)
{
struct resource res;
@@ -133,7 +132,7 @@ static int fch_misc_setup(struct apd_private_data *pdata)
static const struct apd_device_desc fch_misc_desc = {
.setup = fch_misc_setup,
};
-#endif
+#endif /* CONFIG_X86_AMD_PLATFORM_DEVICE */
#ifdef CONFIG_ARM64
static const struct apd_device_desc xgene_i2c_desc = {
@@ -175,13 +174,9 @@ static int fch_misc_setup(struct apd_private_data *pdata)
.setup = acpi_apd_setup,
.fixed_clk_rate = 250000000,
};
-#endif
+#endif /* CONFIG_ARM64 */
-#else
-
-#define APD_ADDR(desc) (0UL)
-
-#endif /* CONFIG_X86_AMD_PLATFORM_DEVICE */
+#endif
/**
* Create platform device during acpi scan attach handle.
--
1.7.12.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/5] ACPI / APD: Head file including cleanups
2020-09-07 8:56 [PATCH 0/5] Cleanups for ACPI APD driver Hanjun Guo
` (3 preceding siblings ...)
2020-09-07 8:56 ` [PATCH 4/5] ACPI / APD: Remove the unneeded APD_ADDR(desc) macro define Hanjun Guo
@ 2020-09-07 8:56 ` Hanjun Guo
2020-09-07 11:19 ` kernel test robot
2020-09-07 13:07 ` kernel test robot
4 siblings, 2 replies; 10+ messages in thread
From: Hanjun Guo @ 2020-09-07 8:56 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-acpi, Ken Xue, Hanjun Guo
Make the including head files to be alphabetical order, and
remove the not needed head file inclusion.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
drivers/acpi/acpi_apd.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 561d9ba..5d50ca7 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -7,17 +7,13 @@
* Wu, Jeff <Jeff.Wu@amd.com>
*/
-#include <linux/clk-provider.h>
-#include <linux/platform_data/clk-fch.h>
-#include <linux/platform_device.h>
-#include <linux/pm_domain.h>
-#include <linux/clkdev.h>
#include <linux/acpi.h>
+#include <linux/clkdev.h>
+#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
-#include <linux/pm.h>
-
-#include "internal.h"
+#include <linux/platform_data/clk-fch.h>
+#include <linux/platform_device.h>
struct apd_private_data;
--
1.7.12.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 5/5] ACPI / APD: Head file including cleanups
2020-09-07 8:56 ` [PATCH 5/5] ACPI / APD: Head file including cleanups Hanjun Guo
@ 2020-09-07 11:19 ` kernel test robot
2020-09-07 12:29 ` Hanjun Guo
2020-09-07 13:07 ` kernel test robot
1 sibling, 1 reply; 10+ messages in thread
From: kernel test robot @ 2020-09-07 11:19 UTC (permalink / raw)
To: Hanjun Guo, Rafael J. Wysocki; +Cc: kbuild-all, linux-acpi, Ken Xue, Hanjun Guo
[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]
Hi Hanjun,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pm/linux-next]
[also build test WARNING on v5.9-rc4 next-20200903]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hanjun-Guo/Cleanups-for-ACPI-APD-driver/20200907-170548
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-s022-20200907 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/acpi/acpi_apd.c:250:13: warning: no previous prototype for 'acpi_apd_init' [-Wmissing-prototypes]
250 | void __init acpi_apd_init(void)
| ^~~~~~~~~~~~~
# https://github.com/0day-ci/linux/commit/a8b5a7197395679505a8a3126b829495abe2ae13
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hanjun-Guo/Cleanups-for-ACPI-APD-driver/20200907-170548
git checkout a8b5a7197395679505a8a3126b829495abe2ae13
vim +/acpi_apd_init +250 drivers/acpi/acpi_apd.c
92082a8886f30a Ken Xue 2015-02-06 249
92082a8886f30a Ken Xue 2015-02-06 @250 void __init acpi_apd_init(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36743 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 5/5] ACPI / APD: Head file including cleanups
2020-09-07 11:19 ` kernel test robot
@ 2020-09-07 12:29 ` Hanjun Guo
0 siblings, 0 replies; 10+ messages in thread
From: Hanjun Guo @ 2020-09-07 12:29 UTC (permalink / raw)
To: kernel test robot, Rafael J. Wysocki; +Cc: kbuild-all, linux-acpi, Ken Xue
On 2020/9/7 19:19, kernel test robot wrote:
> Hi Hanjun,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on pm/linux-next]
> [also build test WARNING on v5.9-rc4 next-20200903]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Hanjun-Guo/Cleanups-for-ACPI-APD-driver/20200907-170548
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> config: x86_64-randconfig-s022-20200907 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.2-191-g10164920-dirty
> # save the attached .config to linux build tree
> make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/acpi/acpi_apd.c:250:13: warning: no previous prototype for 'acpi_apd_init' [-Wmissing-prototypes]
> 250 | void __init acpi_apd_init(void)
> | ^~~~~~~~~~~~~
Hmm, I didn't get this locally, I think it's because acpi_apd_init()
is added in the head file internal.h, but I removed the internal.h
inclusion for head file, I will add it back.
Thanks
Hanjun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 5/5] ACPI / APD: Head file including cleanups
2020-09-07 8:56 ` [PATCH 5/5] ACPI / APD: Head file including cleanups Hanjun Guo
2020-09-07 11:19 ` kernel test robot
@ 2020-09-07 13:07 ` kernel test robot
2020-09-09 0:54 ` Hanjun Guo
1 sibling, 1 reply; 10+ messages in thread
From: kernel test robot @ 2020-09-07 13:07 UTC (permalink / raw)
To: Hanjun Guo, Rafael J. Wysocki
Cc: kbuild-all, clang-built-linux, linux-acpi, Ken Xue, Hanjun Guo
[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]
Hi Hanjun,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pm/linux-next]
[also build test WARNING on v5.9-rc4 next-20200903]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hanjun-Guo/Cleanups-for-ACPI-APD-driver/20200907-170548
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-r021-20200907 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab68517e6b7e51b84c4b0e813a30258ec1ce5da5)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/acpi/acpi_apd.c:250:13: warning: no previous prototype for function 'acpi_apd_init' [-Wmissing-prototypes]
void __init acpi_apd_init(void)
^
drivers/acpi/acpi_apd.c:250:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init acpi_apd_init(void)
^
static
1 warning generated.
# https://github.com/0day-ci/linux/commit/a8b5a7197395679505a8a3126b829495abe2ae13
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hanjun-Guo/Cleanups-for-ACPI-APD-driver/20200907-170548
git checkout a8b5a7197395679505a8a3126b829495abe2ae13
vim +/acpi_apd_init +250 drivers/acpi/acpi_apd.c
92082a8886f30a Ken Xue 2015-02-06 249
92082a8886f30a Ken Xue 2015-02-06 @250 void __init acpi_apd_init(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36796 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 5/5] ACPI / APD: Head file including cleanups
2020-09-07 13:07 ` kernel test robot
@ 2020-09-09 0:54 ` Hanjun Guo
0 siblings, 0 replies; 10+ messages in thread
From: Hanjun Guo @ 2020-09-09 0:54 UTC (permalink / raw)
To: kernel test robot, Rafael J. Wysocki
Cc: kbuild-all, clang-built-linux, linux-acpi, Ken Xue
On 2020/9/7 21:07, kernel test robot wrote:
> Hi Hanjun,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on pm/linux-next]
> [also build test WARNING on v5.9-rc4 next-20200903]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Hanjun-Guo/Cleanups-for-ACPI-APD-driver/20200907-170548
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> config: x86_64-randconfig-r021-20200907 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab68517e6b7e51b84c4b0e813a30258ec1ce5da5)
> 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
> # install x86_64 cross compiling tool for clang build
> # apt-get install binutils-x86-64-linux-gnu
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/acpi/acpi_apd.c:250:13: warning: no previous prototype for function 'acpi_apd_init' [-Wmissing-prototypes]
> void __init acpi_apd_init(void)
> ^
> drivers/acpi/acpi_apd.c:250:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> void __init acpi_apd_init(void)
> ^
> static
> 1 warning generated.
I think this was fixed in v2.
Thanks for the report!
Hanjun
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-09-09 0:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 8:56 [PATCH 0/5] Cleanups for ACPI APD driver Hanjun Guo
2020-09-07 8:56 ` [PATCH 1/5] ACPI / APD: Add kernel doc for the properties in struct apd_device_desc Hanjun Guo
2020-09-07 8:56 ` [PATCH 2/5] ACPI / APD: Remove the flags " Hanjun Guo
2020-09-07 8:56 ` [PATCH 3/5] ACPI / APD: Remove ACPI_MODULE_NAME() Hanjun Guo
2020-09-07 8:56 ` [PATCH 4/5] ACPI / APD: Remove the unneeded APD_ADDR(desc) macro define Hanjun Guo
2020-09-07 8:56 ` [PATCH 5/5] ACPI / APD: Head file including cleanups Hanjun Guo
2020-09-07 11:19 ` kernel test robot
2020-09-07 12:29 ` Hanjun Guo
2020-09-07 13:07 ` kernel test robot
2020-09-09 0:54 ` Hanjun Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).