Skip to contentSkip to conversation

Fix logic in sanity check

PATCH In review Thomas Jarosch 3 participants 5 messages Oct 15, 2011 – Nov 29, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix logic in sanity check

Detected by "cppcheck".

This time with "Signed-off-by" line.

---
 drivers/media/video/m5mols/m5mols_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/m5mols/m5mols_core.c +1 -1
index fb8e4a7..e485e9e 100644
@@ -333,7 +333,7 @@ int m5mols_mode(struct m5mols_info *info, u8 mode)
 	int ret = -EINVAL;
 	u8 reg;
 
-	if (mode < REG_PARAMETER && mode > REG_CAPTURE)
+	if (mode < REG_PARAMETER || mode > REG_CAPTURE)
 		return ret;
 
 	ret = m5mols_read_u8(sd, SYSTEM_SYSMODE, &reg);
Signature · 1 line
1.7.6.4
Acked-by on v1 1/1
#1 lore raw

Hi Thomas,

Quoted 5 lines · Thomas Jarosch

Detected by "cppcheck".

This time with "Signed-off-by" line.

Quoted 17 lines
---
 drivers/media/video/m5mols/m5mols_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/m5mols/m5mols_core.c +1 -1
index fb8e4a7..e485e9e 100644
@@ -333,7 +333,7 @@ int m5mols_mode(struct m5mols_info *info, u8 mode)
 	int ret = -EINVAL;
 	u8 reg;
 
-	if (mode < REG_PARAMETER && mode > REG_CAPTURE)
+	if (mode < REG_PARAMETER || mode > REG_CAPTURE)
 		return ret;
 
 	ret = m5mols_read_u8(sd, SYSTEM_SYSMODE, &reg);
Signature · 2 lines
Regards,
Sylwester
#2 lore raw

Hi,

Quoted 4 lines · Sylwester Nawrocki
Quoted 3 lines · Thomas Jarosch

Detected by "cppcheck".

This time with "Signed-off-by" line.

When a note like this is added, not suitable for the changelog, it should be placed after your SOB line, and below a line containing only the "---" marker. Please check with Documentation/SubmittingPatches for more details.

Quoted 4 lines
Quoted 2 lines

Sorry, I was a bit too quick with this ack.

If you care to resend the patch, please add "m5mols:" as a subsystem name in the subject so it looks something like:

[PATCH ...] m5mols: Fix ...

Quoted 4 lines
Quoted 4 lines
---
  drivers/media/video/m5mols/m5mols_core.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

--
Thanks,
Sylwester

#3 lore raw

Hi Sylwester,

Quoted 9 lines · On Sunday, 20. November 2011 18:26:13 Sylwester Nawrocki wrote:

If you care to resend the patch, please add "m5mols:" as a subsystem name in the subject so it looks something like:

[PATCH ...] m5mols: Fix ...

Quoted 4 lines
Quoted 4 lines

---

  drivers/media/video/m5mols/m5mols_core.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

I'll resend something soonish. Though feel free to fix these cosmetic issues on the fly, too.

Cheers,
Thomas

#4 lore raw

Hi Thomas,

Quoted 6 lines · Thomas Jarosch
Quoted 5 lines · On Sunday, 20. November 2011 18:26:13 Sylwester Nawrocki wrote:

If you care to resend the patch, please add "m5mols:" as a subsystem name in the subject so it looks something like:

[PATCH ...] m5mols: Fix ...

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

---

  drivers/media/video/m5mols/m5mols_core.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

I'll resend something soonish. Though feel free to fix these cosmetic issues on the fly, too.

OK, sorry to bother. I'll pick the patch and amend it when adding to a pull request.

Signature · 2 lines
Thanks!
Sylwester
Quoted 3 lines

Cheers,
Thomas