Re: [PATCH] staging: comedi: drivers: addi-data: hwdrv_apci1500: Change variables that is never used

From: Dan Carpenter
Date: Fri Jan 30 2015 - 08:27:09 EST


The more I look at these, the more I don't like these patches. The
original code looks like:

foo = inb();

There is a 90% chance that we should just delete the whole line, but the
problem is that deleting the whole line is risky because sometimes
reading from the hardware has side effects. So there is a 10% chance
that we should change to to:

inb();

Changing it to that is safer, and that's what we are doing, but there is
a 90% chance that it is the wrong thing to do.

When we silence the warnings in the wrong way, then it makes it harder
for anyone to find the warnings and fix it in the correct way. I also
would like to fix all the static checker warnings in the kernel, but
there is no point in just "silencing the warnings." we should need to
"fix" them.

It's frustrating that we aren't able to fix this code because we don't
have the hardware, but that's the reality. Let's, please, leave the
warnings as-is until someone with hardware can fix them properly.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/