Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp419302lqp; Thu, 21 Mar 2024 05:36:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYARJfCZ3f/Ot8kKoI9QWZeqwMDrU/b+4du0+i6HIVr9zR5Re4JVn77mwaqxnf8EsSd2wvg1w85v/kgKombHVDMOK4F4DBwuwC8m1o7w== X-Google-Smtp-Source: AGHT+IF5shMd+Xpa6DEzeIJKuq29qIgtUen69cnUetSjZRBgfyWoSfEPWrV+ECoA3TvqFgcKdjW9 X-Received: by 2002:a17:902:b947:b0:1dc:adad:f54b with SMTP id h7-20020a170902b94700b001dcadadf54bmr3962516pls.44.1711024573155; Thu, 21 Mar 2024 05:36:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711024573; cv=pass; d=google.com; s=arc-20160816; b=aMrYADgBWld1vAqS1GW7OeN2HMWLR3Kmga5vPFvE9WuvIMHZk99P1xLTaJEJ5tSQw5 biKyhju7tQk1D+xIUQzglvUyEbh7CMnO87+AWxy8xKoxPzNRd/g+QE9+awL7opfi7iXQ LsZkQCuQ3qeqaaJcMkZxF1+FHI5/0r03oyNLDi8xDZSE2qmzBp4tcLFeFRgq5IpfgWbS d+SOMi8vd5l/cCbgJQ3F/XCO0NIYVjR6YjKHwa9oaZZntFPz8lYkAfU6Lsey+RoAVQyT TCmO1lSn76ug2+OqtqOd4KilezT8x5X6dPOi6FzZFnzcKhrvzCOlwKkn4p1pPt6a3Aqw 4utw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=+QCl2H8f5QZWhlj1X2/TKMZ9SOTVp32n96vi+Mo7qdk=; fh=QjZQlPJQOCj91Tsthr5xcEQGtCpM4kPHdPDxmrlgho4=; b=WRurB3VEFe72VwunZ+G7hLygb/GQZhYDmcSnR20rnRC9puQa2FQnU4vrigKmmEr/ss u3nH+2pjLSzcF4cYjbS1JaFqwaeLvgwFgSdpFEAYPkLSD+4IsOWrYGH+JZwYXNa78oq7 4AiFH6i4OBYVJg1eXO9wX2qG/wMkud72wHM2HTOD8B1mFLqzp01zX28+0D5rMIXqD7G2 kCgN9pkVGdSVzxT8+SCuj6gfsUPnmbMos7xrBBFE+lI0Rejn2ZT4H71SYmHjEBmhSMBb kGoLLGiTdoh39HMD/stqDhNdZzW9IId1PD8G0lrz5+ednhylUI9LL3yv3xzn9SQSJOWj b8dg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-crypto+bounces-2794-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id kd6-20020a17090313c600b001defe6d38b6si12179827plb.342.2024.03.21.05.36.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 05:36:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2794-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-crypto+bounces-2794-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AD353284B77 for ; Thu, 21 Mar 2024 12:36:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF4AF79B8E; Thu, 21 Mar 2024 12:36:09 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22BAB1CA98 for ; Thu, 21 Mar 2024 12:36:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711024569; cv=none; b=Lt27XJ0nnzFao5Rj7Q6LHY2eOQQfyORBMUQrRM5MHvRSx8Rw2r0h/GFpjWpbLjrxFbJxqIN0zyGWYi6KKzoMtNImql++CIjir6D3PWXsy5hvnYRYGvJpLFwQM/d3RYzGIQSQZWnc9dNWUay2N77R4mUAO8MIeHOsDapQ+DlQU00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711024569; c=relaxed/simple; bh=HkFGJqDS/d8bV5SUCLpt6uNhTsS8UzdKXxqDY2XYM00=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SMRmD2VVRIn7MhfGCIy92dSPPBs0mG6go3D6emhak+IYNGksUtQi9P1qxJhvK8mrahgEkmSTBas04ukRq8nYLUqXNsBqYNEp7UWohlna6aNKR7yxhmMbzCwEGrVCZy8kyG52avjFa++rCgRxIX+T7b1kEXKMgJ047rIGgoyQIVw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4V0lHP3q8Vz1h3M3; Thu, 21 Mar 2024 20:33:21 +0800 (CST) Received: from dggpemm500024.china.huawei.com (unknown [7.185.36.203]) by mail.maildlp.com (Postfix) with ESMTPS id B11451A0172; Thu, 21 Mar 2024 20:35:55 +0800 (CST) Received: from huawei.com (10.67.174.60) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 21 Mar 2024 20:35:55 +0800 From: GUO Zihua To: , CC: Subject: [PATCH] crypto: algif: Fix typing of arguments of af_alg_wait_for_data Date: Thu, 21 Mar 2024 12:32:17 +0000 Message-ID: <20240321123217.2578417-1-guozihua@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500024.china.huawei.com (7.185.36.203) For af_alg_wait_for_data, the following checkpatch warning is triggered: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' Fix this by chaning unsigned to unsigned int. For argument flags, all the callers are passing in an int, so make it int as well. Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when ctx->more is zero") Signed-off-by: GUO Zihua --- crypto/af_alg.c | 2 +- include/crypto/if_alg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 68cc9290cabe..4da990160fe9 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -860,7 +860,7 @@ EXPORT_SYMBOL_GPL(af_alg_wmem_wakeup); * @min: Set to minimum request size if partial requests are allowed. * Return: 0 when writable memory is available, < 0 upon error */ -int af_alg_wait_for_data(struct sock *sk, unsigned flags, unsigned min) +int af_alg_wait_for_data(struct sock *sk, int flags, unsigned int min) { DEFINE_WAIT_FUNC(wait, woken_wake_function); struct alg_sock *ask = alg_sk(sk); diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h index 78ecaf5db04c..63b1c2852237 100644 --- a/include/crypto/if_alg.h +++ b/include/crypto/if_alg.h @@ -231,7 +231,7 @@ unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset); void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst, size_t dst_offset); void af_alg_wmem_wakeup(struct sock *sk); -int af_alg_wait_for_data(struct sock *sk, unsigned flags, unsigned min); +int af_alg_wait_for_data(struct sock *sk, int flags, unsigned int min); int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, unsigned int ivsize); void af_alg_free_resources(struct af_alg_async_req *areq); -- 2.34.1