Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1364522 > unrolled thread
| Started by | Yaowei Bai <baiyaowei@cmss.chinamobile.com> |
|---|---|
| First post | 2016-03-25 03:20 +0100 |
| Last post | 2016-03-25 03:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] drivers/ata: make ata_using_udma return directly and bool Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2016-03-25 03:20 +0100
| From | Yaowei Bai <baiyaowei@cmss.chinamobile.com> |
|---|---|
| Date | 2016-03-25 03:20 +0100 |
| Subject | [PATCH 2/2] drivers/ata: make ata_using_udma return directly and bool |
| Message-ID | <rgpvX-3cs-1@gated-at.bofh.it> |
This patch makes ata_using_udma return bool due to this
particular function only using either one or zero as its return
value.
This patch also makes ata_using_udma return directly by removing
if condition.
No functional change.
Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
---
include/linux/libata.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2b01760..5dc2083 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1759,11 +1759,9 @@ static inline unsigned long ata_deadline(unsigned long from_jiffies,
change in future hardware and specs, secondly 0xFF means 'no DMA' but is
> UDMA_0. Dyma ddreigiau */
-static inline int ata_using_udma(struct ata_device *adev)
+static inline bool ata_using_udma(struct ata_device *adev)
{
- if (adev->dma_mode >= XFER_UDMA_0 && adev->dma_mode <= XFER_UDMA_7)
- return 1;
- return 0;
+ return adev->dma_mode >= XFER_UDMA_0 && adev->dma_mode <= XFER_UDMA_7;
}
static inline int ata_dma_enabled(struct ata_device *adev)
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web