Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2332497ybv; Mon, 24 Feb 2020 03:27:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxBoAiTkZ9aFZ5SVNvfkQ26RexzIeGy3iwMrT6M7Amcqk7Hy5cfSIoNyvrsr85LVtQVFqtz X-Received: by 2002:aca:ad11:: with SMTP id w17mr12533211oie.85.1582543632171; Mon, 24 Feb 2020 03:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582543632; cv=none; d=google.com; s=arc-20160816; b=THg/Ycuw0woPURNXtTL0dhfrF2DxW4YVCH+knMt2dfXnvP7StvXhSu4AUqaF7Driy4 rreY7iqVj66nMAPWdUNnJJDcjbV9A1jF13o+1xqYdIZzanAbtTxBBoxEnCsP0ibIfNzo YRbN3+f9wLbW0iEQxb7H2MTxoVOU34GqTBC1WAI/1XQhA5rUHe9pzJSGfIYPIHb7BDFl 8a60qHNLmibR8yYTmckttucqhCy4QXZ2+UIaqTu+RjlltnYewU+gjVIUUMkxr+BxXzro AyBmKoehmb4NCkv6taG3I1Qmf3a3/Bp4nftOi+o6o44oz+qSBCbwxTg2pymKjepUErTs B4nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6qKJx4gzfpljmcOcHGiZyzYN7Uu40KJ6LMB+X9Hu3pM=; b=CNKe99ri6cZp1jUMO23Wry121vUNOX1B1U4k+K1ckm89IH3XjWlPkhcqX88GA8FkXR bhAFB5IV0Hd733NML8SVOcvDMjdqn71g+z/d5EzS9/ysGkfI6S/hiL1Wk5g7ITPbgqKa PncVOl3LVXVuGuM0zti8ixfmLAUYt255KZO/3xzPSgL9XEIgSJbXcLePOaMqQwVzAG3K kgxAFuHQaY2oNVJgI98uQKc7a6yEJ73McvOqBHGc40RemlCUT2FLkqOoIlNn2Ii94N12 CTlAVfzuussKBudG9KBQQb2fulWuPJEj8/VDy7ivJHlT4V1Xscra/dV1ZFT4ndpgN+WD x/Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=XyvGvgkM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17si6020499otp.248.2020.02.24.03.26.59; Mon, 24 Feb 2020 03:27:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=XyvGvgkM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727334AbgBXLZl (ORCPT + 99 others); Mon, 24 Feb 2020 06:25:41 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:38270 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgBXLZk (ORCPT ); Mon, 24 Feb 2020 06:25:40 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01O87YYb160437; Mon, 24 Feb 2020 08:09:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=corp-2020-01-29; bh=6qKJx4gzfpljmcOcHGiZyzYN7Uu40KJ6LMB+X9Hu3pM=; b=XyvGvgkMuU4oe4Kzr5MzIxqxC+MueWnjd1wupeXsL9K9hXTjjJ6cIu4lDsnEob+ZeSLO bAazjaqCAshQfY2xw1WvrBuTF54mzLT8+JRflg74v7DZCg6dJnLBBU0TN7y8p9tZ0UN3 yPWVNQHZltckspOi/qND1jd7zQw0PDfhL20h482qprLNvVhTjFutQ1eWB46kc22OhSeB 4RfxIcLwMZHi3bNkQuV3LoLYsAclXmH9jfdJa3f1fv3zX5ok+ATBKwRBNKJLfn0eXdAh NJxkNQ33cwRn1beht/VJWiNTl5fP1UIyZZc2HIGo/ScUc490uAZP21v0Xzbux6HIAZTy nw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2ybvr4hw5m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Feb 2020 08:09:04 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01O87q9q182572; Mon, 24 Feb 2020 08:09:03 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2ybe10nc98-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Feb 2020 08:09:03 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01O88xmR024337; Mon, 24 Feb 2020 08:08:59 GMT Received: from kadam (/129.205.23.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Feb 2020 00:08:59 -0800 Date: Mon, 24 Feb 2020 11:08:42 +0300 From: Dan Carpenter To: Scott Branden Cc: Luis Chamberlain , Greg Kroah-Hartman , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Colin Ian King , Kees Cook , Takashi Iwai , linux-kselftest@vger.kernel.org, Andy Gross Subject: Re: [PATCH v2 3/7] test_firmware: add partial read support for request_firmware_into_buf Message-ID: <20200224080842.GA3308@kadam> References: <20200220004825.23372-1-scott.branden@broadcom.com> <20200220004825.23372-4-scott.branden@broadcom.com> <20200220084255.GW7838@kadam> <9afab7f8-1b5f-a7bb-6b76-f7b19efb2979@broadcom.com> <4a666590-461d-17f9-5580-31a41869383f@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4a666590-461d-17f9-5580-31a41869383f@broadcom.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9540 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002240071 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9540 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 impostorscore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002240071 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2020 at 05:13:08PM -0800, Scott Branden wrote: > > > > +static ssize_t test_dev_config_show_size_t(char *buf, int cfg) > > > > +{ > > > > +??? size_t val; > > > > + > > > > +??? mutex_lock(&test_fw_mutex); > > > > +??? val = cfg; > > > > +??? mutex_unlock(&test_fw_mutex); > > > Both val and cfg are stack variables so there is no need for locking. > > > Probably you meant to pass a pointer to cfg? > I am following the existing code as was done for > test_dev_config_show_bool(), > test_dev_config_show_int(), > test_dev_config_show_u8() Heh. Yes. Those are buggy as well. Good eyes. Could you send a patch to fix them? regards, dan caprnter