Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1218825 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2015-09-04 13:00 +0200 |
| Last post | 2015-09-04 13:00 +0200 |
| Articles | 7 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/5] staging: most: remove always true comparison Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-04 13:00 +0200
[PATCH 3/5] staging: most: remove driver owner Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-04 13:00 +0200
Re: [PATCH 3/5] staging: most: remove driver owner Andrey Shvetsov <andrey.shvetsov@k2l.de> - 2015-09-07 14:20 +0200
Re: [PATCH 3/5] staging: most: remove driver owner Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-07 14:50 +0200
Re: [PATCH 3/5] staging: most: remove driver owner Andrey Shvetsov <andrey.shvetsov@k2l.de> - 2015-09-08 12:00 +0200
Re: [PATCH 3/5] staging: most: remove driver owner Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-08 18:50 +0200
[PATCH 5/5] staging: most: style of bool comparison Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-04 13:00 +0200
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-09-04 13:00 +0200 |
| Subject | [PATCH 1/5] staging: most: remove always true comparison |
| Message-ID | <q4WSS-8hy-7@gated-at.bofh.it> |
channel->dev has already been checked for NULL and if it was NULL then
we have returned with -EPIPE. So at this point it can not be NULL.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/most/aim-cdev/cdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index b0a9a4a..1a17e2a 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -166,7 +166,7 @@ static ssize_t aim_write(struct file *filp, const char __user *buf,
mbo = most_get_mbo(channel->iface, channel->channel_id);
- if (!mbo && channel->dev) {
+ if (!mbo) {
if ((filp->f_flags & O_NONBLOCK))
return -EAGAIN;
if (wait_event_interruptible(
--
1.9.1
--
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 | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-09-04 13:00 +0200 |
| Subject | [PATCH 3/5] staging: most: remove driver owner |
| Message-ID | <q4WST-8hy-37@gated-at.bofh.it> |
| In reply to | #1218825 |
The platform driver core will set the owner value, we do not need to do
it in the module.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/most/hdm-dim2/dim2_hdm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 5b0a588..4481a0b 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -923,7 +923,6 @@ static struct platform_driver dim2_driver = {
.id_table = dim2_id,
.driver = {
.name = "hdm_dim2",
- .owner = THIS_MODULE,
},
};
--
1.9.1
--
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 | Andrey Shvetsov <andrey.shvetsov@k2l.de> |
|---|---|
| Date | 2015-09-07 14:20 +0200 |
| Subject | Re: [PATCH 3/5] staging: most: remove driver owner |
| Message-ID | <q63yW-5hl-31@gated-at.bofh.it> |
| In reply to | #1218826 |
On Fri, Sep 04, 2015 at 04:22:04PM +0530, Sudip Mukherjee wrote:
> The platform driver core will set the owner value, we do not need to do
> it in the module.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> drivers/staging/most/hdm-dim2/dim2_hdm.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> index 5b0a588..4481a0b 100644
> --- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
> +++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> @@ -923,7 +923,6 @@ static struct platform_driver dim2_driver = {
> .id_table = dim2_id,
> .driver = {
> .name = "hdm_dim2",
> - .owner = THIS_MODULE,
I cannot accept this.
This change is not significant for current kernel, but we still have customers
using kernels <= 3.10, where auto assignment of .owner does not exist.
> },
> };
>
> --
> 1.9.1
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
--
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 | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-09-07 14:50 +0200 |
| Subject | Re: [PATCH 3/5] staging: most: remove driver owner |
| Message-ID | <q641Y-5PD-19@gated-at.bofh.it> |
| In reply to | #1220106 |
On Mon, Sep 07, 2015 at 02:13:38PM +0200, Andrey Shvetsov wrote:
> On Fri, Sep 04, 2015 at 04:22:04PM +0530, Sudip Mukherjee wrote:
> > The platform driver core will set the owner value, we do not need to do
> > it in the module.
> >
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > ---
> > drivers/staging/most/hdm-dim2/dim2_hdm.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > index 5b0a588..4481a0b 100644
> > --- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > +++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > @@ -923,7 +923,6 @@ static struct platform_driver dim2_driver = {
> > .id_table = dim2_id,
> > .driver = {
> > .name = "hdm_dim2",
> > - .owner = THIS_MODULE,
> I cannot accept this.
>
> This change is not significant for current kernel, but we still have customers
> using kernels <= 3.10, where auto assignment of .owner does not exist.
But this patch is for 4.4-rc1, and it is not marked for stable. Then how
is it going to affect your customers who are still using <=3.10?
regards
sudip
--
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 | Andrey Shvetsov <andrey.shvetsov@k2l.de> |
|---|---|
| Date | 2015-09-08 12:00 +0200 |
| Subject | Re: [PATCH 3/5] staging: most: remove driver owner |
| Message-ID | <q6nR1-Fh-27@gated-at.bofh.it> |
| In reply to | #1220151 |
On Mon, Sep 07, 2015 at 06:16:21PM +0530, Sudip Mukherjee wrote:
> On Mon, Sep 07, 2015 at 02:13:38PM +0200, Andrey Shvetsov wrote:
> > On Fri, Sep 04, 2015 at 04:22:04PM +0530, Sudip Mukherjee wrote:
> > > The platform driver core will set the owner value, we do not need to do
> > > it in the module.
> > >
> > > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > > ---
> > > drivers/staging/most/hdm-dim2/dim2_hdm.c | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > > index 5b0a588..4481a0b 100644
> > > --- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > > +++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > > @@ -923,7 +923,6 @@ static struct platform_driver dim2_driver = {
> > > .id_table = dim2_id,
> > > .driver = {
> > > .name = "hdm_dim2",
> > > - .owner = THIS_MODULE,
> > I cannot accept this.
> >
> > This change is not significant for current kernel, but we still have customers
> > using kernels <= 3.10, where auto assignment of .owner does not exist.
> But this patch is for 4.4-rc1, and it is not marked for stable. Then how
> is it going to affect your customers who are still using <=3.10?
The customers will get MOST Linux Driver of 4.x and compile it with 3.10.
They'll not even see the warning, but missing owner is definitely not what they
want to have. This patch prepares wasted time of cusomers expiriencing the
issue and ours supporting resolving of some problem. But what we get instead?
--
regards
andy
--
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 | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-09-08 18:50 +0200 |
| Subject | Re: [PATCH 3/5] staging: most: remove driver owner |
| Message-ID | <q6ufN-1tS-19@gated-at.bofh.it> |
| In reply to | #1220669 |
On Tue, Sep 08, 2015 at 11:56:29AM +0200, Andrey Shvetsov wrote:
> On Mon, Sep 07, 2015 at 06:16:21PM +0530, Sudip Mukherjee wrote:
> > On Mon, Sep 07, 2015 at 02:13:38PM +0200, Andrey Shvetsov wrote:
> > > On Fri, Sep 04, 2015 at 04:22:04PM +0530, Sudip Mukherjee wrote:
> > > > The platform driver core will set the owner value, we do not need to do
> > > > it in the module.
> > > >
> > > > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > > > ---
> > > > drivers/staging/most/hdm-dim2/dim2_hdm.c | 1 -
> > > > 1 file changed, 1 deletion(-)
> > > >
> > > > diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > > > index 5b0a588..4481a0b 100644
> > > > --- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > > > +++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > > > @@ -923,7 +923,6 @@ static struct platform_driver dim2_driver = {
> > > > .id_table = dim2_id,
> > > > .driver = {
> > > > .name = "hdm_dim2",
> > > > - .owner = THIS_MODULE,
> > > I cannot accept this.
> > >
> > > This change is not significant for current kernel, but we still have customers
> > > using kernels <= 3.10, where auto assignment of .owner does not exist.
> > But this patch is for 4.4-rc1, and it is not marked for stable. Then how
> > is it going to affect your customers who are still using <=3.10?
> The customers will get MOST Linux Driver of 4.x and compile it with 3.10.
Really? If they do that they are on their own and odds are, it will
break.
> They'll not even see the warning, but missing owner is definitely not what they
> want to have. This patch prepares wasted time of cusomers expiriencing the
> issue and ours supporting resolving of some problem. But what we get instead?
We do not support people taking a kernel driver from one kernel and
putting it into another one. That's never been something that anyone
can ever do with Linux, sorry.
The patch is correct.
greg k-h
--
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 | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-09-04 13:00 +0200 |
| Subject | [PATCH 5/5] staging: most: style of bool comparison |
| Message-ID | <q4WST-8hy-35@gated-at.bofh.it> |
| In reply to | #1218825 |
BOOLEAN tests do not need any comparison to TRUE or FALSE.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/most/hdm-usb/hdm_usb.c | 10 +++++-----
drivers/staging/most/mostcore/core.c | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 34843b0..9bbefaa 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -308,7 +308,7 @@ static int hdm_poison_channel(struct most_interface *iface, int channel)
mutex_lock(&mdev->io_mutex);
free_anchored_buffers(mdev, channel);
- if (mdev->padding_active[channel] == true)
+ if (mdev->padding_active[channel])
mdev->padding_active[channel] = false;
if (mdev->conf[channel].data_type == MOST_CH_ASYNC) {
@@ -411,7 +411,7 @@ static void hdm_write_completion(struct urb *urb)
dev = &mdev->usb_device->dev;
if ((urb->status == -ENOENT) || (urb->status == -ECONNRESET) ||
- (mdev->is_channel_healthy[channel] == false)) {
+ (!mdev->is_channel_healthy[channel])) {
complete(&anchor->urb_compl);
return;
}
@@ -576,7 +576,7 @@ static void hdm_read_completion(struct urb *urb)
dev = &mdev->usb_device->dev;
if ((urb->status == -ENOENT) || (urb->status == -ECONNRESET) ||
- (mdev->is_channel_healthy[channel] == false)) {
+ (!mdev->is_channel_healthy[channel])) {
complete(&anchor->urb_compl);
return;
}
@@ -605,7 +605,7 @@ static void hdm_read_completion(struct urb *urb)
}
} else {
mbo->processed_length = urb->actual_length;
- if (mdev->padding_active[channel] == false) {
+ if (!mdev->padding_active[channel]) {
mbo->status = MBO_SUCCESS;
} else {
if (hdm_remove_padding(mdev, channel, mbo)) {
@@ -685,7 +685,7 @@ static int hdm_enqueue(struct most_interface *iface, int channel, struct mbo *mb
list_add_tail(&anchor->list, &mdev->anchor_list[channel]);
spin_unlock_irqrestore(&mdev->anchor_list_lock[channel], flags);
- if ((mdev->padding_active[channel] == true) &&
+ if ((mdev->padding_active[channel]) &&
(conf->direction & MOST_CH_TX))
if (hdm_add_padding(mdev, channel, mbo)) {
retval = -EIO;
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index 87f950f..eb4e159 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -1339,7 +1339,7 @@ static void most_write_completion(struct mbo *mbo)
c = mbo->context;
if (mbo->status == MBO_E_INVAL)
pr_info("WARN: Tx MBO status: invalid\n");
- if (unlikely((c->is_poisoned == true) || (mbo->status == MBO_E_CLOSE)))
+ if (unlikely(c->is_poisoned || (mbo->status == MBO_E_CLOSE)))
trash_mbo(mbo);
else
arm_mbo(mbo);
@@ -1444,7 +1444,7 @@ static void most_read_completion(struct mbo *mbo)
struct most_c_obj *c;
c = mbo->context;
- if (unlikely((c->is_poisoned == true) || (mbo->status == MBO_E_CLOSE)))
+ if (unlikely(c->is_poisoned || (mbo->status == MBO_E_CLOSE)))
goto release_mbo;
if (mbo->status == MBO_E_INVAL) {
--
1.9.1
--
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