Message ID | 20200226101842.29426-4-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [v1,1/4] dmaengine: Refactor dmaengine_check_align() to be bit operations only | expand |
Hi Andy, On 2/26/20 12:18 PM, Andy Shevchenko wrote: > There is no need to have 'break;' statement in the default case followed by > return certain string literal when all other cases have returned the string > literals. So, refactor it accordingly. Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > include/linux/dmaengine.h | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h > index 1bb5477ef7ec..d3672f065a64 100644 > --- a/include/linux/dmaengine.h > +++ b/include/linux/dmaengine.h > @@ -1560,9 +1560,7 @@ dmaengine_get_direction_text(enum dma_transfer_direction dir) > case DMA_DEV_TO_DEV: > return "DEV_TO_DEV"; > default: > - break; > + return "invalid"; > } > - > - return "invalid"; > } > #endif /* DMAENGINE_H */ > - Péter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 1bb5477ef7ec..d3672f065a64 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -1560,9 +1560,7 @@ dmaengine_get_direction_text(enum dma_transfer_direction dir) case DMA_DEV_TO_DEV: return "DEV_TO_DEV"; default: - break; + return "invalid"; } - - return "invalid"; } #endif /* DMAENGINE_H */
There is no need to have 'break;' statement in the default case followed by return certain string literal when all other cases have returned the string literals. So, refactor it accordingly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- include/linux/dmaengine.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)