linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* staging: pi433: Possible bug in rf69.c
@ 2017-11-10 17:23 Marcus Wolf
  2017-11-10 19:32 ` Dan Carpenter
  2017-11-11 16:02 ` Joe Perches
  0 siblings, 2 replies; 14+ messages in thread
From: Marcus Wolf @ 2017-11-10 17:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, linux-kernel, dan.carpenter

Hi everybody!

Just comparing the master of Gregs statging of pi433 with my local SVN
to review all changes, that were done the last monthes.

I am not sure, but maybe we imported a bug in rf69.c lines 378 and
following:

Gregs repo:
	case automatic:	 return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) & LNA_GAIN_AUTO) );
	case max:	 return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) & LNA_GAIN_MAX) );
	case maxMinus6:  return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) & LNA_GAIN_MAX_MINUS_6) );
	case maxMinus12: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) & LNA_GAIN_MAX_MINUS_12) );
	case maxMinus24: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) & LNA_GAIN_MAX_MINUS_24) );
	case maxMinus36: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) & LNA_GAIN_MAX_MINUS_36) );
	case maxMinus48: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) & LNA_GAIN_MAX_MINUS_48) );

my repo:
	case automatic:	 return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) | LNA_GAIN_AUTO) );
	case max:	 return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) | LNA_GAIN_MAX) );
	case maxMinus6:  return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) | LNA_GAIN_MAX_MINUS_6) );
	case maxMinus12: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) | LNA_GAIN_MAX_MINUS_12) );
	case maxMinus24: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) | LNA_GAIN_MAX_MINUS_24) );
	case maxMinus36: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) | LNA_GAIN_MAX_MINUS_36) );
	case maxMinus48: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) &
~MASK_LNA_GAIN) | LNA_GAIN_MAX_MINUS_48) );

Up to my opinion, my (old) version is better then Gregs (new) version.
If you agree, I'll prepare a patch, to revert the modification.

Thanks,

Marcus

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-11-11 16:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 17:23 staging: pi433: Possible bug in rf69.c Marcus Wolf
2017-11-10 19:32 ` Dan Carpenter
2017-11-11  7:55   ` Marcus Wolf
2017-11-11  8:40     ` Dan Carpenter
2017-11-11  8:45     ` Dan Carpenter
2017-11-11  9:42       ` Marcus Wolf
2017-11-11 11:18         ` Greg Kroah-Hartman
2017-11-11 11:42           ` Marcus Wolf
2017-11-11 11:49             ` Greg Kroah-Hartman
2017-11-11 11:51               ` Marcus Wolf
2017-11-11 12:33                 ` Greg Kroah-Hartman
2017-11-11 12:10         ` Dan Carpenter
2017-11-11 16:02 ` Joe Perches
2017-11-11 16:40   ` Marcus Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).