Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1483976 > unrolled thread
| Started by | Lee Jones <lee.jones@linaro.org> |
|---|---|
| First post | 2016-09-15 12:50 +0200 |
| Last post | 2016-09-15 14:50 +0200 |
| Articles | 7 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/7] mfd: Fix all W=1 warnings Lee Jones <lee.jones@linaro.org> - 2016-09-15 12:50 +0200
[PATCH 3/7] mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls Lee Jones <lee.jones@linaro.org> - 2016-09-15 12:50 +0200
[PATCH 7/7] mfd: cros_ec_spi: Remove unused variable 'request' Lee Jones <lee.jones@linaro.org> - 2016-09-15 12:50 +0200
[PATCH 6/7] mfd: omap-usb-host: Return value is not 'const int' Lee Jones <lee.jones@linaro.org> - 2016-09-15 12:50 +0200
Re: [PATCH 6/7] mfd: omap-usb-host: Return value is not 'const int' Arnd Bergmann <arnd@arndb.de> - 2016-09-15 13:40 +0200
Re: [PATCH 0/7] mfd: Fix all W=1 warnings Arnd Bergmann <arnd@arndb.de> - 2016-09-15 13:40 +0200
Re: [PATCH 0/7] mfd: Fix all W=1 warnings Linus Walleij <linus.walleij@linaro.org> - 2016-09-15 14:50 +0200
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2016-09-15 12:50 +0200 |
| Subject | [PATCH 0/7] mfd: Fix all W=1 warnings |
| Message-ID | <shCoW-5Sc-17@gated-at.bofh.it> |
It really is as simple as it sounds!
Lee Jones (7):
mfd: max8997-irq: 'inline' should be at the beginning of the
declaration
mfd: ab8500-debugfs: Prevent initialised field from being over-written
mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls
mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem()
mfd: ab8500-debugfs: Remove 'weak' function
suspend_test_wake_cause_interrupt_is_mine()
mfd: omap-usb-host: Return value is not 'const int'
mfd: cros_ec_spi: Remove unused variable 'request'
drivers/mfd/ab8500-debugfs.c | 114 ++++++++------------------------------
drivers/mfd/cros_ec_spi.c | 2 -
drivers/mfd/db8500-prcmu.c | 19 -------
drivers/mfd/max8997-irq.c | 2 +-
drivers/mfd/omap-usb-host.c | 2 +-
include/linux/mfd/abx500/ab8500.h | 2 +
include/linux/mfd/db8500-prcmu.h | 6 --
include/linux/mfd/dbx500-prcmu.h | 9 ---
8 files changed, 26 insertions(+), 130 deletions(-)
--
2.9.3
[toc] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2016-09-15 12:50 +0200 |
| Subject | [PATCH 3/7] mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls |
| Message-ID | <shCoX-5Sc-45@gated-at.bofh.it> |
| In reply to | #1483976 |
There are no call sites for these functions. Strip them out.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/db8500-prcmu.c | 19 -------------------
include/linux/mfd/db8500-prcmu.h | 6 ------
include/linux/mfd/dbx500-prcmu.h | 9 ---------
3 files changed, 34 deletions(-)
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 388e268..ca38a6a 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -938,25 +938,6 @@ int db8500_prcmu_get_ddr_opp(void)
return readb(PRCM_DDR_SUBSYS_APE_MINBW);
}
-/**
- * db8500_set_ddr_opp - set the appropriate DDR OPP
- * @opp: The new DDR operating point to which transition is to be made
- * Returns: 0 on success, non-zero on failure
- *
- * This function sets the operating point of the DDR.
- */
-static bool enable_set_ddr_opp;
-int db8500_prcmu_set_ddr_opp(u8 opp)
-{
- if (opp < DDR_100_OPP || opp > DDR_25_OPP)
- return -EINVAL;
- /* Changing the DDR OPP can hang the hardware pre-v21 */
- if (enable_set_ddr_opp)
- writeb(opp, PRCM_DDR_SUBSYS_APE_MINBW);
-
- return 0;
-}
-
/* Divide the frequency of certain clocks by 2 for APE_50_PARTLY_25_OPP. */
static void request_even_slower_clocks(bool enable)
{
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 0bd6944..7ba67b5 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -538,7 +538,6 @@ int db8500_prcmu_get_arm_opp(void);
int db8500_prcmu_set_ape_opp(u8 opp);
int db8500_prcmu_get_ape_opp(void);
int db8500_prcmu_request_ape_opp_100_voltage(bool enable);
-int db8500_prcmu_set_ddr_opp(u8 opp);
int db8500_prcmu_get_ddr_opp(void);
u32 db8500_prcmu_read(unsigned int reg);
@@ -594,11 +593,6 @@ static inline int prcmu_release_usb_wakeup_state(void)
return 0;
}
-static inline int db8500_prcmu_set_ddr_opp(u8 opp)
-{
- return 0;
-}
-
static inline int db8500_prcmu_get_ddr_opp(void)
{
return DDR_100_OPP;
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index 5d37460..2e2c6a6 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -269,10 +269,6 @@ unsigned long prcmu_clock_rate(u8 clock);
long prcmu_round_clock_rate(u8 clock, unsigned long rate);
int prcmu_set_clock_rate(u8 clock, unsigned long rate);
-static inline int prcmu_set_ddr_opp(u8 opp)
-{
- return db8500_prcmu_set_ddr_opp(opp);
-}
static inline int prcmu_get_ddr_opp(void)
{
return db8500_prcmu_get_ddr_opp();
@@ -489,11 +485,6 @@ static inline int prcmu_get_arm_opp(void)
return ARM_100_OPP;
}
-static inline int prcmu_set_ddr_opp(u8 opp)
-{
- return 0;
-}
-
static inline int prcmu_get_ddr_opp(void)
{
return DDR_100_OPP;
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2016-09-15 12:50 +0200 |
| Subject | [PATCH 7/7] mfd: cros_ec_spi: Remove unused variable 'request' |
| Message-ID | <shCoX-5Sc-57@gated-at.bofh.it> |
| In reply to | #1483976 |
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/cros_ec_spi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c
index ebe9b94..a518832 100644
--- a/drivers/mfd/cros_ec_spi.c
+++ b/drivers/mfd/cros_ec_spi.c
@@ -366,7 +366,6 @@ static int cros_ec_spi_receive_response(struct cros_ec_device *ec_dev,
static int cros_ec_pkt_xfer_spi(struct cros_ec_device *ec_dev,
struct cros_ec_command *ec_msg)
{
- struct ec_host_request *request;
struct ec_host_response *response;
struct cros_ec_spi *ec_spi = ec_dev->priv;
struct spi_transfer trans, trans_delay;
@@ -378,7 +377,6 @@ static int cros_ec_pkt_xfer_spi(struct cros_ec_device *ec_dev,
int ret = 0, final_ret;
len = cros_ec_prepare_tx(ec_dev, ec_msg);
- request = (struct ec_host_request *)ec_dev->dout;
dev_dbg(ec_dev->dev, "prepared, len=%d\n", len);
/* If it's too soon to do another transaction, wait */
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2016-09-15 12:50 +0200 |
| Subject | [PATCH 6/7] mfd: omap-usb-host: Return value is not 'const int' |
| Message-ID | <shCoX-5Sc-59@gated-at.bofh.it> |
| In reply to | #1483976 |
Change from 'const int' to just 'int'.
Cc: <robh+dt@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/omap-usb-host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 1d924d1..7aab376 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -162,7 +162,7 @@ static const char * const port_modes[] = {
* provided port mode string as per the port_modes table.
* If no match is found it returns -ENODEV
*/
-static const int omap_usbhs_get_dt_port_mode(const char *mode)
+static int omap_usbhs_get_dt_port_mode(const char *mode)
{
int i;
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-09-15 13:40 +0200 |
| Subject | Re: [PATCH 6/7] mfd: omap-usb-host: Return value is not 'const int' |
| Message-ID | <shDbk-6oz-15@gated-at.bofh.it> |
| In reply to | #1483983 |
On Thursday, September 15, 2016 11:45:20 AM CEST Lee Jones wrote: > Change from 'const int' to just 'int'. > > Cc: <robh+dt@kernel.org> > Signed-off-by: Lee Jones <lee.jones@linaro.org> > Looks good, I seem to have done the same thing. Also didn't submit, so keep your version. I tend to include the exact warning in the changelog, which here was drivers/mfd/omap-usb-host.c:165:18: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] Arnd
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-09-15 13:40 +0200 |
| Message-ID | <shDbk-6oz-25@gated-at.bofh.it> |
| In reply to | #1483976 |
On Thursday, September 15, 2016 11:45:14 AM CEST Lee Jones wrote:
> It really is as simple as it sounds!
>
I seem to have one that you didn't find.
Arnd
8<--------
From 6c63171eba728fc6d8bc6358884deaccd4cee33d Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 4 Aug 2016 15:28:51 +0200
Subject: [PATCH] mfd: tps65912: move regmap config into core driver
When building with extra warnings enabled, most files including
linux/mfd/tps65912.h warn about a static variable defined in the
header:
include/linux/mfd/tps65912.h:331:35: warning: 'tps65912_regmap_config' defined but not used [-Wunused-const-variable=]
We also duplicate the data structure between the i2c and spi front-end
drivers. Moving it into the driver code avoids the warning and
the duplication.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
index a88cfa80dbc4..f33567bc428d 100644
--- a/drivers/mfd/tps65912-core.c
+++ b/drivers/mfd/tps65912-core.c
@@ -77,6 +77,23 @@ static struct regmap_irq_chip tps65912_irq_chip = {
.init_ack_masked = true,
};
+static const struct regmap_range tps65912_yes_ranges[] = {
+ regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
+};
+
+static const struct regmap_access_table tps65912_volatile_table = {
+ .yes_ranges = tps65912_yes_ranges,
+ .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
+};
+
+const struct regmap_config tps65912_regmap_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+ .cache_type = REGCACHE_RBTREE,
+ .volatile_table = &tps65912_volatile_table,
+};
+EXPORT_SYMBOL_GPL(tps65912_regmap_config);
+
int tps65912_device_init(struct tps65912 *tps)
{
int ret;
diff --git a/include/linux/mfd/tps65912.h b/include/linux/mfd/tps65912.h
index 1a603701550e..b25d0297ba88 100644
--- a/include/linux/mfd/tps65912.h
+++ b/include/linux/mfd/tps65912.h
@@ -319,21 +319,7 @@ struct tps65912 {
struct regmap_irq_chip_data *irq_data;
};
-static const struct regmap_range tps65912_yes_ranges[] = {
- regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
-};
-
-static const struct regmap_access_table tps65912_volatile_table = {
- .yes_ranges = tps65912_yes_ranges,
- .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
-};
-
-static const struct regmap_config tps65912_regmap_config = {
- .reg_bits = 8,
- .val_bits = 8,
- .cache_type = REGCACHE_RBTREE,
- .volatile_table = &tps65912_volatile_table,
-};
+extern const struct regmap_config tps65912_regmap_config;
int tps65912_device_init(struct tps65912 *tps);
int tps65912_device_exit(struct tps65912 *tps);
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-09-15 14:50 +0200 |
| Message-ID | <shEh3-75Z-3@gated-at.bofh.it> |
| In reply to | #1483976 |
On Thu, Sep 15, 2016 at 12:45 PM, Lee Jones <lee.jones@linaro.org> wrote: > It really is as simple as it sounds! > > Lee Jones (7): > mfd: max8997-irq: 'inline' should be at the beginning of the > declaration > mfd: ab8500-debugfs: Prevent initialised field from being over-written > mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls > mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem() > mfd: ab8500-debugfs: Remove 'weak' function > suspend_test_wake_cause_interrupt_is_mine() > mfd: omap-usb-host: Return value is not 'const int' > mfd: cros_ec_spi: Remove unused variable 'request' Acked-by: Linus Walleij <linus.walleij@linaro.org> For all the ab8500 and db8500 stuff. Yours, Linus Walleij
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web