All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/8] [Staging]: Removed an unnecessary #if
@ 2022-03-09  9:12 Hatim Muhammed
  2022-03-18 12:40 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Hatim Muhammed @ 2022-03-09  9:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: greg, abbotti, hsweeten, Hatim Muhammed

From: Hatim Muhammed <hatimmohammed369@gmail.com>

This removed #if had 1 as its condition, hence it's body will always
execute and its #else block will never

Signed-off-by: Hatim Muhammed <hatimmohammed369@gmail.com>
---
 drivers/comedi/drivers/s526.c | 49 -----------------------------------
 1 file changed, 49 deletions(-)

diff --git a/drivers/comedi/drivers/s526.c b/drivers/comedi/drivers/s526.c
index 9245c679a3c4..df9d240518ef 100644
--- a/drivers/comedi/drivers/s526.c
+++ b/drivers/comedi/drivers/s526.c
@@ -229,7 +229,6 @@ static int s526_gpct_insn_config(struct comedi_device *dev,
 		 */
 		devpriv->gpct_config[chan] = data[0];
 
-#if 1
 		/*  Set Counter Mode Register */
 		val = data[1] & 0xffff;
 		outw(val, dev->iobase + S526_GPCT_MODE_REG(chan));
@@ -246,54 +245,6 @@ static int s526_gpct_insn_config(struct comedi_device *dev,
 			 *      dev->iobase + S526_GPCT_CTRL_REG(chan));
 			 */
 		}
-#else
-		val = S526_GPCT_MODE_CTDIR_CTRL_QUAD;
-
-		/*  data[1] contains GPCT_X1, GPCT_X2 or GPCT_X4 */
-		if (data[1] == GPCT_X2)
-			val |= S526_GPCT_MODE_CLK_SRC_QUADX2;
-		else if (data[1] == GPCT_X4)
-			val |= S526_GPCT_MODE_CLK_SRC_QUADX4;
-		else
-			val |= S526_GPCT_MODE_CLK_SRC_QUADX1;
-
-		/*  When to take into account the indexpulse: */
-		/*
-		 * if (data[2] == GPCT_IndexPhaseLowLow) {
-		 * } else if (data[2] == GPCT_IndexPhaseLowHigh) {
-		 * } else if (data[2] == GPCT_IndexPhaseHighLow) {
-		 * } else if (data[2] == GPCT_IndexPhaseHighHigh) {
-		 * }
-		 */
-		/*  Take into account the index pulse? */
-		if (data[3] == GPCT_RESET_COUNTER_ON_INDEX) {
-			/*  Auto load with INDEX^ */
-			val |= S526_GPCT_MODE_AUTOLOAD_IXRISE;
-		}
-
-		/*  Set Counter Mode Register */
-		val = data[1] & 0xffff;
-		outw(val, dev->iobase + S526_GPCT_MODE_REG(chan));
-
-		/*  Load the pre-load register */
-		s526_gpct_write(dev, chan, data[2]);
-
-		/*  Write the Counter Control Register */
-		if (data[3])
-			outw(data[3] & 0xffff,
-			     dev->iobase + S526_GPCT_CTRL_REG(chan));
-
-		/*  Reset the counter if it is software preload */
-		if ((val & S526_GPCT_MODE_AUTOLOAD_MASK) ==
-		    S526_GPCT_MODE_AUTOLOAD_NONE) {
-			/*  Reset the counter */
-			outw(S526_GPCT_CTRL_CT_RESET,
-			     dev->iobase + S526_GPCT_CTRL_REG(chan));
-			/*  Load the counter from PR0 */
-			outw(S526_GPCT_CTRL_CT_LOAD,
-			     dev->iobase + S526_GPCT_CTRL_REG(chan));
-		}
-#endif
 		break;
 
 	case INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR:
-- 
2.35.1


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

* Re: [PATCH 6/8] [Staging]: Removed an unnecessary #if
  2022-03-09  9:12 [PATCH 6/8] [Staging]: Removed an unnecessary #if Hatim Muhammed
@ 2022-03-18 12:40 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2022-03-18 12:40 UTC (permalink / raw)
  To: Hatim Muhammed; +Cc: linux-kernel, abbotti, hsweeten

On Wed, Mar 09, 2022 at 11:12:13AM +0200, Hatim Muhammed wrote:
> From: Hatim Muhammed <hatimmohammed369@gmail.com>
> 
> This removed #if had 1 as its condition, hence it's body will always
> execute and its #else block will never
> 
> Signed-off-by: Hatim Muhammed <hatimmohammed369@gmail.com>
> ---
>  drivers/comedi/drivers/s526.c | 49 -----------------------------------
>  1 file changed, 49 deletions(-)

Your subject line is very odd.  Where are the 8 other patches?

Please fix it up and resend the whole series properly.  I've dropped all
of your pending patches from my queue now.

thanks,

greg k-h

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

end of thread, other threads:[~2022-03-18 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09  9:12 [PATCH 6/8] [Staging]: Removed an unnecessary #if Hatim Muhammed
2022-03-18 12:40 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.