Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp291445pxj; Tue, 1 Jun 2021 22:26:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBvWo0bWnPc87kyVMQw98RXSGcCHg2OmZyc5fUDwmCS6I64Gi35TUx1D7w2ASUk8WENXdJ X-Received: by 2002:a17:906:b317:: with SMTP id n23mr15203469ejz.324.1622611577549; Tue, 01 Jun 2021 22:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622611577; cv=none; d=google.com; s=arc-20160816; b=e6yE1nI4FdKj6fal2A8ltuu+t7I2g0749/b+tW8FGrZW02dyE7c6JAsuxNu/gl0JgH F5sXH9CP1d/kPKZnXYiO7aERischcjQE+DGlF6R+AL2EnU+JMZmXp5XQYhFMbHfwokOo ujtXK0o3Uz9AcmYWirjWD/FlF8Pj/F0depYrOYOheEUrbuZbbmH6vKIEC6kF48FMrD8X XPruNPYxsYFOsFx4817262QTA37tHwZ9ai7itsPfxb9Remcm0iwmm3IcETfP0/szuH58 5wiSTF8e0FGB/i12kxelXV/8jAWuFk+pn0lL0Dd2pALE/UytBLpivE7113l4fleLZWuY cwJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=1TDpe76QCMlK98rmsDOpW9rlo1cfB56GeEVAF6X+Ekg=; b=O4800csNiFgPDRWV/5CRmro/kILsFu1lPrX+bTWgf5p2lJq36+0vPDUib5daIpcfUS CjZYyqGxA/jKEcX66ivHBwVi2jlawu81ZEExPLxQUj3Ih6dxPuaPrW9C+PYJd+UKXy+U 6DmHQyVtICxpyCFsx0ZnDw1jKC7QikKsVUn3/xldGFVCgw28HtZD8gORIDX8nNeA9kBG x63LFHUtN2il4sh2bZCH1SMwdG1gl85ghol6EGjbTd+slq2lqydYSXRIxn90lr8cab8o q9+tAZOK3O7jdcU7QngqZLzqeN+YWnaKU0+m43eSEOW1FfmhIFoooO5D/hDTpKTHtuzu o0SQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si2576171ejw.685.2021.06.01.22.25.12; Tue, 01 Jun 2021 22:26:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230145AbhFBBlB (ORCPT + 99 others); Tue, 1 Jun 2021 21:41:01 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2940 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbhFBBlB (ORCPT ); Tue, 1 Jun 2021 21:41:01 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Fvs7S1CN6z6917; Wed, 2 Jun 2021 09:36:20 +0800 (CST) Received: from dggpemm000001.china.huawei.com (7.185.36.245) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 2 Jun 2021 09:39:17 +0800 Received: from [10.174.178.95] (10.174.178.95) by dggpemm000001.china.huawei.com (7.185.36.245) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 2 Jun 2021 09:39:17 +0800 Subject: Re: [PATCH -next] media: rc: Fix a typo in lirc_ioctl To: Sean Young References: <20210601100235.69935-1-tongtiangen@huawei.com> <20210601102506.GA13203@gofer.mess.org> CC: Mauro Carvalho Chehab , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: tongtiangen Message-ID: <8a18bc10-8e6d-3cb8-5551-899cc20d2b1f@huawei.com> Date: Wed, 2 Jun 2021 09:39:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20210601102506.GA13203@gofer.mess.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.95] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm000001.china.huawei.com (7.185.36.245) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/1 18:25, Sean Young wrote: > On Tue, Jun 01, 2021 at 06:02:35PM +0800, Tong Tiangen wrote: >> Fix a typo in lirc_ioctl, apparently min_timeout should be used >> in this case. >> >> Fixes: e589333f346b ("V4L/DVB: IR: extend interfaces to support more device settings") >> Signed-off-by: Tong Tiangen >> --- >> drivers/media/rc/lirc_dev.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c >> index 116daf90c858..abbeae2ccd4a 100644 >> --- a/drivers/media/rc/lirc_dev.c >> +++ b/drivers/media/rc/lirc_dev.c >> @@ -534,7 +534,7 @@ static long lirc_ioctl(struct file *file, unsigned int cmd, unsigned long arg) >> >> /* Generic timeout support */ >> case LIRC_GET_MIN_TIMEOUT: >> - if (!dev->max_timeout) >> + if (!dev->min_timeout) > So maybe this isn't the clearest piece of code, but all rc drivers set > either both of min_timeout & max_timeout, or neither. Having a max_timeout > without a min_timeout does not make any sense. > > Changing this to min_timeout gives the impression min_timeout can be set > without max_timeout, which is not the case. This should at least commented. > > Thanks > > Sean I agree, the necessary comments should be added here. Thanks > >> ret = -ENOTTY; >> else >> val = dev->min_timeout; >> -- >> 2.18.0.huawei.25 > . >