Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1198611 > unrolled thread
| Started by | Adrian Remonda <adrianremonda@gmail.com> |
|---|---|
| First post | 2015-08-03 09:50 +0200 |
| Last post | 2015-08-03 22:40 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
[PATCHv3 0/6] Staging: most: several warnings fix reported by sparse Adrian Remonda <adrianremonda@gmail.com> - 2015-08-03 09:50 +0200
[PATCHv3 2/6] Staging: most: Fix "Using plain integer as NULL pointer" warnings Adrian Remonda <adrianremonda@gmail.com> - 2015-08-03 09:50 +0200
[PATCHv3 5/6] Staging: most: Fix "missing static keyword" warnings Adrian Remonda <adrianremonda@gmail.com> - 2015-08-03 09:50 +0200
[PATCHv3 6/6] Staging: most: Fix "Using plain integer as NULL pointer" warnings Adrian Remonda <adrianremonda@gmail.com> - 2015-08-03 09:50 +0200
Re: [PATCHv3 0/6] Staging: most: several warnings fix reported by sparse Dan Carpenter <dan.carpenter@oracle.com> - 2015-08-03 10:40 +0200
Re: [PATCHv3 0/6] Staging: most: several warnings fix reported by sparse AdrianRemonda <adrianremonda@gmail.com> - 2015-08-03 22:40 +0200
| From | Adrian Remonda <adrianremonda@gmail.com> |
|---|---|
| Date | 2015-08-03 09:50 +0200 |
| Subject | [PATCHv3 0/6] Staging: most: several warnings fix reported by sparse |
| Message-ID | <pTiFs-50N-23@gated-at.bofh.it> |
This patch series fix several warnings reported by the Sparse tool
v2: Fixed patch format and comments as noted by
Greg Kroah-Hartman and clear a few more warnings
v3: Fixed patch format as noted by Greg Kroah-Hartman
Adrian Remonda (6):
Staging: most: Fix "missing static keyword" warnings in the core.c file
Staging: most: Fix "Using plain integer as NULL pointer" warnings
in core.c file.
Staging: most: Fix "missing static keyword" warnings in the hdm_usb.c file
Staging: most: Fix "Using plain integer as NULL pointer" warnings
in dim2_hal.c file.
Staging: most: Fix "missing static keyword" warnings in the aim_cdev.c file
Staging: most: Fix "Using plain integer as NULL pointer" warnings
in networking.c file.
drivers/staging/most/aim-cdev/cdev.c | 14 +++++++-------
drivers/staging/most/aim-network/networking.c | 4 ++--
drivers/staging/most/hdm-dim2/dim2_hal.c | 2 +-
drivers/staging/most/hdm-usb/hdm_usb.c | 14 +++++++-------
drivers/staging/most/mostcore/core.c | 16 ++++++++--------
5 files changed, 25 insertions(+), 25 deletions(-)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Adrian Remonda <adrianremonda@gmail.com> |
|---|---|
| Date | 2015-08-03 09:50 +0200 |
| Subject | [PATCHv3 2/6] Staging: most: Fix "Using plain integer as NULL pointer" warnings |
| Message-ID | <pTiFt-50N-45@gated-at.bofh.it> |
| In reply to | #1198611 |
This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the offending 0 with NULL.
Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
---
drivers/staging/most/mostcore/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index 8d1b68dbeaf8..7e338217779c 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -982,7 +982,7 @@ static ssize_t store_add_link(struct most_aim_obj *aim_obj,
if (ret)
return ret;
- if (mdev_devnod == 0 || *mdev_devnod == 0) {
+ if (mdev_devnod == NULL || *mdev_devnod == 0) {
snprintf(devnod_buf, PAGE_SIZE, "%s-%s", mdev, mdev_ch);
mdev_devnod = devnod_buf;
}
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Adrian Remonda <adrianremonda@gmail.com> |
|---|---|
| Date | 2015-08-03 09:50 +0200 |
| Subject | [PATCHv3 5/6] Staging: most: Fix "missing static keyword" warnings |
| Message-ID | <pTiFt-50N-39@gated-at.bofh.it> |
| In reply to | #1198611 |
This is a patch to the most/aim_cdev.c file. It makes several
local functions and structures static to prevent global visibility.
Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
---
drivers/staging/most/aim-cdev/cdev.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index d5fb4a0e0818..047acfbef793 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -49,7 +49,7 @@ static struct list_head channel_list;
static spinlock_t ch_list_lock;
-struct aim_channel *get_channel(struct most_interface *iface, int id)
+static struct aim_channel *get_channel(struct most_interface *iface, int id)
{
struct aim_channel *channel, *tmp;
unsigned long flags;
@@ -288,7 +288,7 @@ static const struct file_operations channel_fops = {
* This frees allocated memory and removes the cdev that represents this
* channel in user space.
*/
-int aim_disconnect_channel(struct most_interface *iface, int channel_id)
+static int aim_disconnect_channel(struct most_interface *iface, int channel_id)
{
struct aim_channel *channel;
unsigned long flags;
@@ -328,7 +328,7 @@ int aim_disconnect_channel(struct most_interface *iface, int channel_id)
* This searches for the channel linked to this MBO and stores it in the local
* fifo buffer.
*/
-int aim_rx_completion(struct mbo *mbo)
+static int aim_rx_completion(struct mbo *mbo)
{
struct aim_channel *channel;
@@ -355,7 +355,7 @@ int aim_rx_completion(struct mbo *mbo)
*
* This wakes sleeping processes in the wait-queue.
*/
-int aim_tx_completion(struct most_interface *iface, int channel_id)
+static int aim_tx_completion(struct most_interface *iface, int channel_id)
{
struct aim_channel *channel;
@@ -375,7 +375,7 @@ int aim_tx_completion(struct most_interface *iface, int channel_id)
return 0;
}
-struct most_aim cdev_aim;
+static struct most_aim cdev_aim;
/**
* aim_probe - probe function of the driver module
@@ -389,7 +389,7 @@ struct most_aim cdev_aim;
*
* Returns 0 on success or error code otherwise.
*/
-int aim_probe(struct most_interface *iface, int channel_id,
+static int aim_probe(struct most_interface *iface, int channel_id,
struct most_channel_config *cfg,
struct kobject *parent, char *name)
{
@@ -462,7 +462,7 @@ error_alloc_channel:
return retval;
}
-struct most_aim cdev_aim = {
+static struct most_aim cdev_aim = {
.name = "cdev",
.probe_channel = aim_probe,
.disconnect_channel = aim_disconnect_channel,
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Adrian Remonda <adrianremonda@gmail.com> |
|---|---|
| Date | 2015-08-03 09:50 +0200 |
| Subject | [PATCHv3 6/6] Staging: most: Fix "Using plain integer as NULL pointer" warnings |
| Message-ID | <pTiFt-50N-49@gated-at.bofh.it> |
| In reply to | #1198611 |
This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0 with NULL. Signed-off-by: Adrian Remonda <adrianremonda@gmail.com> --- drivers/staging/most/aim-network/networking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/most/aim-network/networking.c b/drivers/staging/most/aim-network/networking.c index 4639c49240f1..a1e1bce16296 100644 --- a/drivers/staging/most/aim-network/networking.c +++ b/drivers/staging/most/aim-network/networking.c @@ -295,7 +295,7 @@ static void most_net_rm_netdev_safe(struct net_dev_context *nd) unregister_netdev(nd->dev); free_netdev(nd->dev); - nd->dev = 0; + nd->dev = NULL; } static struct net_dev_context *get_net_dev_context( @@ -311,7 +311,7 @@ static struct net_dev_context *get_net_dev_context( } } spin_unlock(&list_lock); - return 0; + return NULL; } static int aim_probe_channel(struct most_interface *iface, int channel_idx, -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2015-08-03 10:40 +0200 |
| Subject | Re: [PATCHv3 0/6] Staging: most: several warnings fix reported by sparse |
| Message-ID | <pTjrQ-6aB-13@gated-at.bofh.it> |
| In reply to | #1198611 |
The subjects still are not unique. Greg said this earlier. If you want just do it in two patches. [patch 1] add static [patch 2] use NULL instead of zero regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | AdrianRemonda <adrianremonda@gmail.com> |
|---|---|
| Date | 2015-08-03 22:40 +0200 |
| Subject | Re: [PATCHv3 0/6] Staging: most: several warnings fix reported by sparse |
| Message-ID | <pTuGD-5xs-9@gated-at.bofh.it> |
| In reply to | #1198637 |
On Mon, Aug 03, 2015 at 11:30:18AM +0300, Dan Carpenter wrote: > The subjects still are not unique. Greg said this earlier. > > If you want just do it in two patches. > > [patch 1] add static > [patch 2] use NULL instead of zero > > regards, > dan carpenter > Yes, sorry. I totally messed it up. I thought Greg was referring just to the cover letter. Thanks for the hints Regards, Adrian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web