Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1690246 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-07-18 15:10 +0200 |
| Last post | 2017-07-20 13:10 +0200 |
| Articles | 9 — 6 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static Colin King <colin.king@canonical.com> - 2017-07-18 15:10 +0200
Re: [PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static Marcus Wolf <marcus.wolf@wolf-entwicklungen.de> - 2017-07-19 22:00 +0200
Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static "Wolf Entwicklungen" <Marcus.Wolf@Wolf-Entwicklungen.de> - 2017-07-20 13:10 +0200
Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static Colin Ian King <colin.king@canonical.com> - 2017-07-20 15:00 +0200
Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static Marcus Wolf <marcus.wolf@wolf-entwicklungen.de> - 2017-07-20 17:10 +0200
Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-29 02:10 +0200
Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static Marcus Wolf <marcus.wolf@wolf-entwicklungen.de> - 2017-07-29 11:10 +0200
Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-29 13:10 +0200
Re: [PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static "Wolf Entwicklungen" <Marcus.Wolf@Wolf-Entwicklungen.de> - 2017-07-20 13:10 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-07-18 15:10 +0200 |
| Subject | [PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static |
| Message-ID | <u4Aqd-2Pp-11@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
The function rf69_set_bandwidth_intern is local to the source
and do not need to be in global scope, so make it static. Also
break overly wide line.
Cleans up sparse warning:
symbol 'update_share_count' was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/staging/pi433/rf69.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index e391ce777bc7..04af906476e3 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -433,7 +433,8 @@ int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dccPer
return rf69_set_dc_cut_off_frequency_intern(spi, REG_AFCBW, dccPercent);
}
-int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mantisse, u8 exponent)
+static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg,
+ enum mantisse mantisse, u8 exponent)
{
u8 newValue;
--
2.11.0
[toc] | [next] | [standalone]
| From | Marcus Wolf <marcus.wolf@wolf-entwicklungen.de> |
|---|---|
| Date | 2017-07-19 22:00 +0200 |
| Subject | Re: [PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static |
| Message-ID | <u53iy-4NJ-9@gated-at.bofh.it> |
| In reply to | #1690246 |
Hi Colin,
thanks for your patches.
#1 is fine. Same fix was provided by Joseph Wright. I tested it and it works
fine.
#2 looks fine, too.
Conerning #3, I would suggest to declare rf69_set_dc_cut_off_frequency static,
as well. Would you prefer to remove rf69_set_dc_cut_off_frequency from the
header (rf69.h) or would you prefer to add a static there?
If you prefer to keep the line in the header, we should spend a line for
rf69_set_bandwidth_intern in the header, too.
Again thank you :-)
Marcus
> Colin King <colin.king@canonical.com> hat am 18. Juli 2017 um 15:03
> geschrieben:
>
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The function rf69_set_bandwidth_intern is local to the source
> and do not need to be in global scope, so make it static. Also
> break overly wide line.
>
> Cleans up sparse warning:
> symbol 'update_share_count' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/staging/pi433/rf69.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> index e391ce777bc7..04af906476e3 100644
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -433,7 +433,8 @@ int rf69_set_dc_cut_off_frequency_during_afc(struct
> spi_device *spi, enum dccPer
> return rf69_set_dc_cut_off_frequency_intern(spi, REG_AFCBW, dccPercent);
> }
>
> -int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse
> mantisse, u8 exponent)
> +static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg,
> + enum mantisse mantisse, u8 exponent)
> {
> u8 newValue;
>
> --
> 2.11.0
>
>
[toc] | [prev] | [next] | [standalone]
| From | "Wolf Entwicklungen" <Marcus.Wolf@Wolf-Entwicklungen.de> |
|---|---|
| Date | 2017-07-20 13:10 +0200 |
| Subject | Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static |
| Message-ID | <u5hve-6vT-37@gated-at.bofh.it> |
| In reply to | #1690246 |
Declare rf69_set_dc_cut_off_frequency_intern as static since it
is used internaly only
Fixes: 874bcba65f9a ("staging: pi433: New driver")
Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -433,7 +433,7 @@
return rf69_set_dc_cut_off_frequency_intern(spi, REG_AFCBW, dccPercent);
}
-int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mantisse, u8 exponent)
+static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mantisse, u8 exponent)
{
u8 newValue;
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -41,7 +41,6 @@
int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance);
int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
enum lnaGain rf69_get_lna_gain(struct spi_device *spi);
-int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dccPercent dccPercent);
int rf69_set_dc_cut_off_frequency(struct spi_device *spi, enum dccPercent dccPercent);
int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dccPercent dccPercent);
int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
[toc] | [prev] | [next] | [standalone]
| From | Colin Ian King <colin.king@canonical.com> |
|---|---|
| Date | 2017-07-20 15:00 +0200 |
| Subject | Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static |
| Message-ID | <u5jdF-7zI-47@gated-at.bofh.it> |
| In reply to | #1692807 |
On 20/07/17 12:01, Wolf Entwicklungen wrote:
> Declare rf69_set_dc_cut_off_frequency_intern as static since it
> is used internaly only
>
> Fixes: 874bcba65f9a ("staging: pi433: New driver")
> Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
>
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -433,7 +433,7 @@
> return rf69_set_dc_cut_off_frequency_intern(spi, REG_AFCBW, dccPercent);
> }
>
> -int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mantisse, u8 exponent)
> +static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mantisse, u8 exponent)
> {
> u8 newValue;
> diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
> --- a/drivers/staging/pi433/rf69.h
> +++ b/drivers/staging/pi433/rf69.h
> @@ -41,7 +41,6 @@
> int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance);
> int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
> enum lnaGain rf69_get_lna_gain(struct spi_device *spi);
> -int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dccPercent dccPercent);
> int rf69_set_dc_cut_off_frequency(struct spi_device *spi, enum dccPercent dccPercent);
> int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dccPercent dccPercent);
> int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
>
This is better than my original patch, so ignore my patch "staging:
pi433: Make functions rf69_set_bandwidth_intern static"
Colin
[toc] | [prev] | [next] | [standalone]
| From | Marcus Wolf <marcus.wolf@wolf-entwicklungen.de> |
|---|---|
| Date | 2017-07-20 17:10 +0200 |
| Subject | Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static |
| Message-ID | <u5lft-JN-51@gated-at.bofh.it> |
| In reply to | #1692907 |
Hi Colin,
mine is an aditional patch for an other function, that's pretty similar to the
one, you improoved. So we need both patches, yours and mine!
Cheers,
Marcus
> Colin Ian King <colin.king@canonical.com> hat am 20. Juli 2017 um 14:58
> geschrieben:
>
>
> On 20/07/17 12:01, Wolf Entwicklungen wrote:
> > Declare rf69_set_dc_cut_off_frequency_intern as static since it
> > is used internaly only
> >
> > Fixes: 874bcba65f9a ("staging: pi433: New driver")
> > Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
> >
> > diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> > --- a/drivers/staging/pi433/rf69.c
> > +++ b/drivers/staging/pi433/rf69.c
> > @@ -433,7 +433,7 @@
> > return rf69_set_dc_cut_off_frequency_intern(spi, REG_AFCBW, dccPercent);
> > }
> >
> > -int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse
> > mantisse, u8 exponent)
> > +static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum
> > mantisse mantisse, u8 exponent)
> > {
> > u8 newValue;
> > diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
> > --- a/drivers/staging/pi433/rf69.h
> > +++ b/drivers/staging/pi433/rf69.h
> > @@ -41,7 +41,6 @@
> > int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance
> > antennaImpedance);
> > int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
> > enum lnaGain rf69_get_lna_gain(struct spi_device *spi);
> > -int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg,
> > enum dccPercent dccPercent);
> > int rf69_set_dc_cut_off_frequency(struct spi_device *spi, enum dccPercent
> > dccPercent);
> > int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum
> > dccPercent dccPercent);
> > int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8
> > exponent);
> >
>
> This is better than my original patch, so ignore my patch "staging:
> pi433: Make functions rf69_set_bandwidth_intern static"
>
> Colin
>
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-07-29 02:10 +0200 |
| Subject | Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static |
| Message-ID | <u8nup-2Ax-11@gated-at.bofh.it> |
| In reply to | #1692807 |
On Thu, Jul 20, 2017 at 01:01:46PM +0200, Wolf Entwicklungen wrote:
> Declare rf69_set_dc_cut_off_frequency_intern as static since it
> is used internaly only
>
> Fixes: 874bcba65f9a ("staging: pi433: New driver")
> Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
>
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -433,7 +433,7 @@
> return rf69_set_dc_cut_off_frequency_intern(spi, REG_AFCBW, dccPercent);
> }
>
> -int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mantisse, u8 exponent)
> +static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mantisse, u8 exponent)
> {
> u8 newValue;
> diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
> --- a/drivers/staging/pi433/rf69.h
> +++ b/drivers/staging/pi433/rf69.h
> @@ -41,7 +41,6 @@
> int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance);
> int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
> enum lnaGain rf69_get_lna_gain(struct spi_device *spi);
> -int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dccPercent dccPercent);
> int rf69_set_dc_cut_off_frequency(struct spi_device *spi, enum dccPercent dccPercent);
> int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dccPercent dccPercent);
> int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Patch does not apply :(
[toc] | [prev] | [next] | [standalone]
| From | Marcus Wolf <marcus.wolf@wolf-entwicklungen.de> |
|---|---|
| Date | 2017-07-29 11:10 +0200 |
| Subject | Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static |
| Message-ID | <u8vV0-8v4-25@gated-at.bofh.it> |
| In reply to | #1699180 |
Hi Greg, also had a very close look to this patch. Even in your reply I can't find any problems with line wraps or other corruptions :-/ But we have alternative patches, solving these problems as well. You e.g. could use the patch [PATCH] Make functions rf69_set_bandwidth_intern and rf69_set_dc_cut_off_frequency_intern static from Colin King 21/07/2017. It's doing exactly the same, my patch should have done. But be careful - tonight you added patch staging: pi433: Make functions rf69_set_bandwidth_intern static" Clins patch includes that changes as well! Once again sorry for my crappy patches, Marcus
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-07-29 13:10 +0200 |
| Subject | Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static |
| Message-ID | <u8xN8-1nc-7@gated-at.bofh.it> |
| In reply to | #1699269 |
On Sat, Jul 29, 2017 at 11:09:23AM +0200, Marcus Wolf wrote: > Hi Greg, > > also had a very close look to this patch. Even in your reply I can't find any > problems with line wraps or other corruptions :-/ > Here are the relevant lines from Greg's email: > +++ b/drivers/staging/pi433/rf69.c > @@ -221,7 +221,7 @@ int rf69_set_frequency(struct spi_device *spi, u32 > frequency) The "frequency)" bit is supposed to be on the line before. regards, dan carpenter
[toc] | [prev] | [next] | [standalone]
| From | "Wolf Entwicklungen" <Marcus.Wolf@Wolf-Entwicklungen.de> |
|---|---|
| Date | 2017-07-20 13:10 +0200 |
| Subject | Re: [PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static |
| Message-ID | <u5hve-6vT-41@gated-at.bofh.it> |
| In reply to | #1690246 |
Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de>
Am Di, 18.07.2017, 15:03 schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
>
> The function rf69_set_bandwidth_intern is local to the source
> and do not need to be in global scope, so make it static. Also
> break overly wide line.
>
> Cleans up sparse warning:
> symbol 'update_share_count' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/staging/pi433/rf69.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> index e391ce777bc7..04af906476e3 100644
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -433,7 +433,8 @@ int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dccPer
> return rf69_set_dc_cut_off_frequency_intern(spi, REG_AFCBW, dccPercent);
> }
>
> -int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mantisse, u8 exponent)
> +static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg,
> + enum mantisse mantisse, u8 exponent)
> {
> u8 newValue;
>
> --
> 2.11.0
>
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web