From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754130AbbHGUBZ (ORCPT ); Fri, 7 Aug 2015 16:01:25 -0400 Received: from www.linutronix.de ([62.245.132.108]:51908 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753837AbbHGUBW (ORCPT ); Fri, 7 Aug 2015 16:01:22 -0400 From: Sebastian Andrzej Siewior To: Vinod Koul , Russell King , peter@hurleysoftware.com Cc: Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, nsekhar@ti.com, linux-omap@vger.kernel.org, linux-serial@vger.kernel.org, john.ogness@linutronix.de, Peter Ujfalusi Subject: [PATCH 2/3] dma: add __must_check annotation for dmaengine_pause() Date: Fri, 7 Aug 2015 22:00:18 +0200 Message-Id: <1438977619-15488-3-git-send-email-bigeasy@linutronix.de> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1438977619-15488-1-git-send-email-bigeasy@linutronix.de> References: <1438977619-15488-1-git-send-email-bigeasy@linutronix.de> X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In 8250-omap I learned it the hard way that ignoring the return code of dmaengine_pause() might be bad because the underlying DMA driver might not support the function at all and so not doing what one is expecting. This patch adds the __must_check annotation as suggested by Russell King. Signed-off-by: Sebastian Andrzej Siewior --- include/linux/dmaengine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 8ad9a4e839f6..4eac4716bded 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -825,7 +825,7 @@ static inline int dmaengine_terminate_all(struct dma_chan *chan) return -ENOSYS; } -static inline int dmaengine_pause(struct dma_chan *chan) +static inline int __must_check dmaengine_pause(struct dma_chan *chan) { if (chan->device->device_pause) return chan->device->device_pause(chan); -- 2.5.0