From patchwork Mon Dec 10 11:34:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10721125 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1787A112E for ; Mon, 10 Dec 2018 11:36:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0654F29E1A for ; Mon, 10 Dec 2018 11:36:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 045EA29E27; Mon, 10 Dec 2018 11:36:53 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 A36BE29E23 for ; Mon, 10 Dec 2018 11:36:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727545AbeLJLgo (ORCPT ); Mon, 10 Dec 2018 06:36:44 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:15669 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726146AbeLJLgo (ORCPT ); Mon, 10 Dec 2018 06:36:44 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3FAC2F0013B09; Mon, 10 Dec 2018 19:36:41 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Mon, 10 Dec 2018 19:36:36 +0800 From: YueHaibing To: , , , CC: , , , YueHaibing Subject: [PATCH net-next] ieee802154: ca8210: remove a dead branch Date: Mon, 10 Dec 2018 19:34:43 +0800 Message-ID: <20181210113443.22796-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix follwing gcc warning: drivers/net/ieee802154/ca8210.c:730:10: warning: comparison is always false due to limited range of data type [-Wtype-limits] the variable 'len' is of type u8 and cannot greater than CA8210_SPI_BUF_SIZE , which is 256. Signed-off-by: YueHaibing --- drivers/net/ieee802154/ca8210.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c index 0ff5a40..0fe204f 100644 --- a/drivers/net/ieee802154/ca8210.c +++ b/drivers/net/ieee802154/ca8210.c @@ -727,14 +727,6 @@ static void ca8210_rx_done(struct cas_control *cas_ctl) buf = cas_ctl->tx_in_buf; len = buf[1] + 2; - if (len > CA8210_SPI_BUF_SIZE) { - dev_crit( - &priv->spi->dev, - "Received packet len (%d) erroneously long\n", - len - ); - goto finish; - } if (buf[0] & SPI_SYN) { if (priv->sync_command_response) {