From patchwork Wed Dec 6 14:41:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 10096187 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 79E7060329 for ; Wed, 6 Dec 2017 14:54:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C134299C7 for ; Wed, 6 Dec 2017 14:54:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 609E0299CF; Wed, 6 Dec 2017 14:54:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA164299C7 for ; Wed, 6 Dec 2017 14:54:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752471AbdLFOl3 (ORCPT ); Wed, 6 Dec 2017 09:41:29 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34128 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752588AbdLFOlY (ORCPT ); Wed, 6 Dec 2017 09:41:24 -0500 Received: by mail-lf0-f65.google.com with SMTP id x20so4524718lff.1 for ; Wed, 06 Dec 2017 06:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=9VnqICUFtk3k4hUO3TfZoTK8qYkP6d+A2Hdn++JYj00=; b=SqKLZR0c/W/cY8Bjv6wNjs4/1K+t1wlYSV6lRGfnhiUUSrZPbqvJPNKVd/Z3Zhb9YA eI6aatUVBED9wjmZMwTP7dCxW9+kfcrE8YxQ3nTzVYDBNevq9HlEWyAu5yT0meLYQL6h jl6roUVbvkdugVqMlXiW1YbktC9WXzbh0vtF8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9VnqICUFtk3k4hUO3TfZoTK8qYkP6d+A2Hdn++JYj00=; b=ioDSamX/FzMjMz8yTsKtYjxaXbVaqksw1UgSre7ZuwATJ63VUOIQ/GdIQYzKiVEXq6 uTtB1Mi4VmALdAUR+fPUGL0gsEEXwohtGVBd4MIPILH7DOFhA17eM2NJQGWEDlH7OyQ8 tsskI7U/zeZjja3jABmkBdrovusxgtote5zXhldkdkDVhVFNc3RH8ebSasXqC41gnRU1 gHGdux+1ZxO86LihMPWqJWlInCXiTmWss2YyM7Bx3WcS5JuWICfgw5kTtnux11RCrnwK i5HWvyBMQO0wk7UFJANX/ib9OdUT9RfA7X9GICibFkTZMp9dBDdRqKbbR+iKx6N8B8mJ WYWQ== X-Gm-Message-State: AJaThX5N8jt9YVz1inLIDKYlnmV43qjKE+tRsoz+AAoF/U5jwJhYGa3m EM74HKKoNbiwZxQG08MWClnPSsRvikA= X-Google-Smtp-Source: AGs4zMbXnID6RYK/LgMS3ZcGz0aSrPeSM4uR9n68vtuVeefoJIfMNy23u6oW6//0T1yxw55Tt8ERhA== X-Received: by 10.46.17.70 with SMTP id f67mr12459630lje.160.1512571282273; Wed, 06 Dec 2017 06:41:22 -0800 (PST) Received: from khorivan.synapse.com (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id u11sm534947lfk.75.2017.12.06.06.41.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 06:41:21 -0800 (PST) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com Cc: netdev@vger.kernel.org, davem@davemloft.net, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH net-next] net: ethernet: ti: cpdma: rate is not changed - correct case Date: Wed, 6 Dec 2017 16:41:18 +0200 Message-Id: <1512571278-13196-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If rate is the same as set it's correct case. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index e4d6edf..dbe9167 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -841,7 +841,7 @@ int cpdma_chan_set_rate(struct cpdma_chan *ch, u32 rate) return -EINVAL; if (ch->rate == rate) - return rate; + return 0; ctlr = ch->ctlr; spin_lock_irqsave(&ctlr->lock, flags);