Signed-off-by: Badhri Jagan Sridharan <[email protected]>
---
drivers/usb/typec/tcpm/tcpci_maxim.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
index 4b6705f3d7b7..af3a7ecab23b 100644
--- a/drivers/usb/typec/tcpm/tcpci_maxim.c
+++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
@@ -68,25 +68,29 @@ static struct max_tcpci_chip *tdata_to_max_tcpci(struct tcpci_data *tdata)
return container_of(tdata, struct max_tcpci_chip, data);
}
-static int max_tcpci_read16(struct max_tcpci_chip *chip, unsigned int reg, u16 *val)
+inline int max_tcpci_read16(struct max_tcpci_chip *chip, unsigned int reg, u16 *val)
{
return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u16));
}
+EXPORT_SYMBOL_GPL(max_tcpci_read16);
-static int max_tcpci_write16(struct max_tcpci_chip *chip, unsigned int reg, u16 val)
+inline int max_tcpci_write16(struct max_tcpci_chip *chip, unsigned int reg, u16 val)
{
return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u16));
}
+EXPORT_SYMBOL_GPL(max_tcpci_write16);
-static int max_tcpci_read8(struct max_tcpci_chip *chip, unsigned int reg, u8 *val)
+inline int max_tcpci_read8(struct max_tcpci_chip *chip, unsigned int reg, u8 *val)
{
return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u8));
}
+EXPORT_SYMBOL_GPL(max_tcpci_read8);
-static int max_tcpci_write8(struct max_tcpci_chip *chip, unsigned int reg, u8 val)
+inline int max_tcpci_write8(struct max_tcpci_chip *chip, unsigned int reg, u8 val)
{
return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u8));
}
+EXPORT_SYMBOL_GPL(max_tcpci_write8);
static void max_tcpci_init_regs(struct max_tcpci_chip *chip)
{
--
2.37.2.672.g94769d06f0-goog
Hi Badhri,
On Fri, Aug 26, 2022 at 01:40:00AM -0700, Badhri Jagan Sridharan wrote:
> Signed-off-by: Badhri Jagan Sridharan <[email protected]>
No commit message? I guess you want to do this because you want to
split the driver into several files. Please put that into your commit
message.
> ---
> drivers/usb/typec/tcpm/tcpci_maxim.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
> index 4b6705f3d7b7..af3a7ecab23b 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
> @@ -68,25 +68,29 @@ static struct max_tcpci_chip *tdata_to_max_tcpci(struct tcpci_data *tdata)
> return container_of(tdata, struct max_tcpci_chip, data);
> }
>
> -static int max_tcpci_read16(struct max_tcpci_chip *chip, unsigned int reg, u16 *val)
> +inline int max_tcpci_read16(struct max_tcpci_chip *chip, unsigned int reg, u16 *val)
> {
> return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u16));
> }
> +EXPORT_SYMBOL_GPL(max_tcpci_read16);
Hold on! You don't need to export these under any circumstance.
If you want to make these inline function, move them to a header.
Otherwise just make them non-static.
Either way, don't export them.
> -static int max_tcpci_write16(struct max_tcpci_chip *chip, unsigned int reg, u16 val)
> +inline int max_tcpci_write16(struct max_tcpci_chip *chip, unsigned int reg, u16 val)
> {
> return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u16));
> }
> +EXPORT_SYMBOL_GPL(max_tcpci_write16);
>
> -static int max_tcpci_read8(struct max_tcpci_chip *chip, unsigned int reg, u8 *val)
> +inline int max_tcpci_read8(struct max_tcpci_chip *chip, unsigned int reg, u8 *val)
> {
> return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u8));
> }
> +EXPORT_SYMBOL_GPL(max_tcpci_read8);
>
> -static int max_tcpci_write8(struct max_tcpci_chip *chip, unsigned int reg, u8 val)
> +inline int max_tcpci_write8(struct max_tcpci_chip *chip, unsigned int reg, u8 val)
> {
> return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u8));
> }
> +EXPORT_SYMBOL_GPL(max_tcpci_write8);
>
> static void max_tcpci_init_regs(struct max_tcpci_chip *chip)
> {
> --
> 2.37.2.672.g94769d06f0-goog
--
heikki
On Fri, Aug 26, 2022 at 01:40:00AM -0700, Badhri Jagan Sridharan wrote:
> Signed-off-by: Badhri Jagan Sridharan <[email protected]>
As Heikki pointed out, I can not accept changes with no changelog text
at all, you know this.
Please write a good changelog text that explains why you are doing this
so we can properly review it. As it is, we have no idea what is going
on here at all.
thanks,
greg k-h
Thanks for the feedback ! Brain fade moment of not including commit message.
Not exporting symbols anymore and I have squashed the patch as well into
"[PATCH v2 3/3] usb: typec: maxim_contaminant: Implement
check_contaminant callback"
which I just sent out.
On Tue, Aug 30, 2022 at 6:00 AM Greg Kroah-Hartman
<[email protected]> wrote:
>
> On Fri, Aug 26, 2022 at 01:40:00AM -0700, Badhri Jagan Sridharan wrote:
> > Signed-off-by: Badhri Jagan Sridharan <[email protected]>
>
> As Heikki pointed out, I can not accept changes with no changelog text
> at all, you know this.
>
> Please write a good changelog text that explains why you are doing this
> so we can properly review it. As it is, we have no idea what is going
> on here at all.
>
> thanks,
>
> greg k-h