From patchwork Fri Sep 27 18:16:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pintu Kumar X-Patchwork-Id: 13814476 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7F9ECDD1CD for ; Fri, 27 Sep 2024 18:17:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2B5E66B0124; Fri, 27 Sep 2024 14:17:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 266216B0125; Fri, 27 Sep 2024 14:17:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 12DAC6B0126; Fri, 27 Sep 2024 14:17:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id EAA256B0124 for ; Fri, 27 Sep 2024 14:17:51 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 58F1B161428 for ; Fri, 27 Sep 2024 18:17:51 +0000 (UTC) X-FDA: 82611326742.25.7B0293F Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by imf03.hostedemail.com (Postfix) with ESMTP id 3473D2000C for ; Fri, 27 Sep 2024 18:17:48 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="N0 CaCZ8"; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf03.hostedemail.com: domain of quic_pintu@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_pintu@quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727460934; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=aDfvZgQEJuxrkulYeZkIpVjsIBwvH4nh23ruW1qhnVY=; b=q4SVeXjQ8336ckzXoqAAqNI8NhygDr2SpYP8j1jWiHwT7tixeUQ870XsN5AAis8gfQq0bT cMvC4Q4++v7+Nl7wMHZAsWyxJQMKzINW6yc/x9Q0eKaoTFCOQZaqiRCu74w+SVUwyPvCvB PHokqZlVi60+s+Kh0hQZ+cQ0IcoR9Ck= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727460934; a=rsa-sha256; cv=none; b=3PpdGO988PD7aBGxN2BvlzxSJXmoIY7Au4qtXJKLiSrKmePbgtACmAthgJf8D9qE5fZTPV ezs7M6mlVTx3rxLoiCSrPMLFDuRIQmOAdeSydeR6hSvnae4l85pwsL/FlTy2QTiHXCLuGu QEDbbi0SthkNFFritA6gqz0nOtj7F/M= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="N0 CaCZ8"; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf03.hostedemail.com: domain of quic_pintu@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_pintu@quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48RGU744000903; Fri, 27 Sep 2024 18:17:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-type:date:from:message-id:mime-version:subject:to; s= qcppdkim1; bh=aDfvZgQEJuxrkulYeZkIpVjsIBwvH4nh23ruW1qhnVY=; b=N0 CaCZ87xF/B5odmOIitr5liFUz7DrF0pf8uqnEbNdqUHw7rcov0tFSyAhiKKsNO+/ hg3Jmwwlj2piXXbUXc8TWrv7kJPxgKwVLbTLbHfdg5HCR84JQ15D0dEjlpito6FB coKb3YDZtOslQ5lnPi9x+CYoewfFWNVBfZG/AL+bTaugXbH71vi/jPGF2ql6ZU1j jPZVij99F7Xxy2SkG5lKVHgWo+jO5NCswp1o8HJ3IZrMtUy7D40r0RP9m7ljfgZu TDCxiKqJ0xHBPGmhJmPufCwF2WXgeU2Rb8ubNzmj93MpqyjflfgqNWHI0eRPAY0B E1AEAFZCWI03E/ZvVAWg== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41sn3skp08-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2024 18:17:38 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 48RIHSPs013445 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2024 18:17:28 GMT Received: from hu-pintu-blr.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 27 Sep 2024 11:17:24 -0700 From: Pintu Kumar To: , , CC: , , , Pintu Kumar Subject: [PATCH] mm/cma: fix useless return in void function Date: Fri, 27 Sep 2024 23:46:37 +0530 Message-ID: <20240927181637.19941-1-quic_pintu@quicinc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: NbH8Pt8JkqFhxt4Y0pln47e5hUZ9nuW7 X-Proofpoint-ORIG-GUID: NbH8Pt8JkqFhxt4Y0pln47e5hUZ9nuW7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 mlxscore=0 impostorscore=0 spamscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 clxscore=1011 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409270133 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 3473D2000C X-Stat-Signature: qneumc4fztid7r1spq7ke1qqt8t3jmqb X-Rspam-User: X-HE-Tag: 1727461068-270099 X-HE-Meta: U2FsdGVkX1/5KtZVYSGwF6zkeryZo4mBbcCL+lBTQgMS8b0q5UdNWs6qFMHBZjc8AHMexdDnfPUA4H1XE4QBXJ2fimI2ttFyEN+6uYQHr60a9V/aq/otpO4zfgKaydT/pMQJYWqgJH/oBlIJxh2VN3DNlJodo0kBHnUhcO71EVsGqIU2KHCmpjHz7fBKytfdtc0uewFjjTanUlCnA1fausFYNUXLJLo1KxPm6V8K2crdl6Nk/d/1r6Iv7AkMYt5cGn38wnrF5t+fJ9irV54V5s+r9k7YAodDCkTuhGSHTuGpfmckZibsfMzVsPiZwRnaNl1p9oddebNr4l9CBsLm0lKxExEF/ElVrPJTzuSblHatI2qqqAoI37lSuq0+5VNNLx18LffcK55b2jVnCElz2Ys6XmXNO7waGXbqkPT9UM0mya+PPs+z96FQmPtFoLMjCX75ZvEXOFaNJC5Y2//Kt0MxeJYsv9bxOLdzRveOnvVr+lUaMoUN0kFjWbbF2lkrkN52CD9kJhrxkuQVAY/1byu1IdxpQV9PCuYG9pZWSOzJw8bbac7r/heX8lkvZZxJ0vPhfjCvWLxbv3V2HtR4i3xJkjdxLRk5c11Nd5sSZLTSr8g8BkNj2OFMjpl9jgCBcF+ok4jXj8W9v5eYy+0OZI7MuU25ULXpC4wiworQuzH8XItMgqLEcLYXHpC/61x1IZBCgHFZbJ2oCFoQj6KX6+/TbQOAHs4vkPzXTN4ApEvdHPSo9l3UA75dhLhTI/JFcrVrtlgvN7nPMXZko0lDMi0uRVZKaMHGTG7aTjUF1z1U2PeQOdOzmChqDt3jp5WtM/BJVloX/qO6ibedNhsRbnrN06b5yvGDqah5Cpv3VLfEcribqPyMcSyh9Z79/RE6yq3qWBYQqcmYcTZecewj7ORBpbE7P0sfWBnXaKsbXamnt7CXCCChp3npsvSyp/o4SFz+Gq4hmF0k8XQ3ryq LG7rKW5t qMvtxTuWjbFkIR5F8OQPw3h3MI/oEDOBjM0vnwYnOmDvkglkir+nlWFTshyeYygXkxwbAfmjr1CLA3BZn3SCppyXFfk+vKRazm/j1Ny+5PEhUE+paujq2m/IIZPFgWyCnSFrKsfAsH6JGSbi5H/B425GIaYPO8E4AsPB7rCO4KHRv47QntUjixWZAZ3Rwt6a1Oy4Kr29Ptuj8pwml+xjd73LG4IXJvQuYsLW8UWrrdQS7GFH9iRTC5tDZGLENqd2UDVPUCVmiPjAOIg8uW3JSq2Os+6Mu4psCFIKfVwpzB9gGQ+Pc7iNTEG5mxCpwQY8fFMgSM7mbdF2PnXrS3XHousptTU46icQoLAAO X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There is a unnecessary return statement at the end of void function cma_activate_area. This can be dropped. While at it, also fix another warning related to unsigned. These are reported by checkpatch as well. WARNING: Prefer 'unsigned int' to bare use of 'unsigned' +unsigned cma_area_count; WARNING: void function return statements are not generally useful + return; +} Signed-off-by: Pintu Kumar --- mm/cma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/cma.c b/mm/cma.c index 2d9fae939283..c5869d0001ad 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -32,7 +32,7 @@ #include "cma.h" struct cma cma_areas[MAX_CMA_AREAS]; -unsigned cma_area_count; +unsigned int cma_area_count; static DEFINE_MUTEX(cma_mutex); phys_addr_t cma_get_base(const struct cma *cma) @@ -135,7 +135,6 @@ static void __init cma_activate_area(struct cma *cma) totalcma_pages -= cma->count; cma->count = 0; pr_err("CMA area %s could not be activated\n", cma->name); - return; } static int __init cma_init_reserved_areas(void)