From patchwork Sat May 5 11:33:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10382129 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 8288660159 for ; Sat, 5 May 2018 11:33:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 728CC288D8 for ; Sat, 5 May 2018 11:33:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 669D3294EA; Sat, 5 May 2018 11:33:58 +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 41F05288D8 for ; Sat, 5 May 2018 11:33:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751118AbeEELdy (ORCPT ); Sat, 5 May 2018 07:33:54 -0400 Received: from osg.samsung.com ([64.30.133.232]:38321 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbeEELdx (ORCPT ); Sat, 5 May 2018 07:33:53 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id EC99020EB2; Sat, 5 May 2018 04:33:52 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s6hZPpKMWxUl; Sat, 5 May 2018 04:33:52 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [177.159.250.117]) by osg.samsung.com (Postfix) with ESMTPSA id DE73020EAA; Sat, 5 May 2018 04:33:51 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1fEvRl-00037e-4R; Sat, 05 May 2018 07:33:49 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Akihiro Tsukada , Arvind Yadav , Hans Verkuil Subject: [PATCH] media: pt1: fix strncmp() size warning Date: Sat, 5 May 2018 07:33:48 -0400 Message-Id: <5ebaf32866b649cc4e384725ce2742d705c064e6.1525520023.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.17.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As warned by smatch: drivers/media/pci/pt1/pt1.c:213 config_demod() error: strncmp() '"tc90522sat"' too small (11 vs 20) Use the same strncmp() syntax as pt1_init_frontends() does. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/pt1/pt1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c index a3126d7caac7..3b7e08a4639a 100644 --- a/drivers/media/pci/pt1/pt1.c +++ b/drivers/media/pci/pt1/pt1.c @@ -210,7 +210,8 @@ static int config_demod(struct i2c_client *cl, enum pt1_fe_clk clk) return ret; usleep_range(30000, 50000); - is_sat = !strncmp(cl->name, TC90522_I2C_DEV_SAT, I2C_NAME_SIZE); + is_sat = !strncmp(cl->name, TC90522_I2C_DEV_SAT, + strlen(TC90522_I2C_DEV_SAT)); if (is_sat) { struct i2c_msg msg[2]; u8 wbuf, rbuf;