Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3294223lqo; Tue, 21 May 2024 12:20:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVs206ZRzHqnt8GPWRJqCCfT1iccobXnF2QCVl9KXlLE1Yqa/a19xd8wR3Fvfq+nKgUYoF2Msu4Ku9VWHmvFPLdhJw48H8cj+tRrJwV5Q== X-Google-Smtp-Source: AGHT+IEMYD93j69+h4lxBK927Mi1FnFwXiH/b+NvZsLACc8+bb7SnLHh7ZxXwseK8vNfgtEnus1x X-Received: by 2002:a17:90a:2c86:b0:2a4:e9d:9888 with SMTP id 98e67ed59e1d1-2bd9f4899e2mr59437a91.16.1716319232408; Tue, 21 May 2024 12:20:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716319232; cv=pass; d=google.com; s=arc-20160816; b=Ej2VTTicVORz2yyPkWS8tvD1s5fBd4wwf7g1jTZzmj0q5pzURtZjEoiAVViXKCjVvu OH1mWegJVODh2pVawctMrj3ifV5xqBuvc0/VJmmAHjljUwRsdrIJCJNzB7q259a5QPWM VauEDZU1AElJICxOoud5HtEHoPwLajrjifelN7+uUV38FjTUpPes+pyNaoQ8JDQlP/We uRIBbHhapxE8OTlDs9F7UbuTGHEHbhuNikPHj9AGM0UsaZREC0hB6v85pNfWQjcO/tgD ZUcwVw+b08WxvYi6/CPW+FSH369CdE+JTyBLlLIf3O3xDdHM/ZeF2R6ArSGuErtSbZBH gzWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SrdXLGjWhEyhLmHl2VU7Bdjjuz3cIxz8d7WDLf2ZpKo=; fh=aHDvLVVvmaHxf1Omv9cbNV7ubVHVsqaTpBJiXuVX+iI=; b=L5q4FBvhPQRN2h7qa6sz8aNwU1O1mHoVW2C8kGVeJYE6ll3Ab30fbtShdBwUnclqd4 zEnMlBvQHioGki1lI4uP9+njRFe1JS9aOvWlwAMu4CtwP4uOpI6I2n7dCrJg66Od4RiB gEdG4cQsrxn2mm6gTuD2EhlDWZVxvpkTm33/OYYkx3q0CVZ4u2KxPObPRHxz8ydkqLrh dWfR6PLVulKAjgZGRkqDi7rUmPIzMNRX7A+6BshgWusmMsAfc7CMnMlNJryKPo9af1rE ++4pxyGZybklYirM0Pz4POwVyVO6m7+LwIECHi1F6RzG2h7bQBEISg+W6TPzkmvHLz8r 9DiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UVNe5BgS; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-185375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185375-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bd9a467e77si423323a91.14.2024.05.21.12.20.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 12:20:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UVNe5BgS; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-185375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185375-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 B2B2E2838DF for ; Tue, 21 May 2024 19:20:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57B3B149019; Tue, 21 May 2024 19:20:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="UVNe5BgS" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 20D8F1865C; Tue, 21 May 2024 19:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716319224; cv=none; b=sjxORQq36d/bvo6urvdhEKnw59fQ80qwc10wpEFLR890niSAHA6DKg86sbjSJTmlp4ZfMGS6LE2znK4ibIG+smXifx9g3rL5MtRXwl7wU11C6qrffCFDvcUAAUxMmWGsadhZrfbHOzD7Ufa6hkVZvW3jxbakoX6sqc2qDVFKLRA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716319224; c=relaxed/simple; bh=GyzDIv+gEXNgSGP3NuX3DC8m5/JkMz+u2luxNY65WNI=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rNdLEeh/j8rQxTrEm7tDXcJKpTykC0Na8jLvODGfagkLJ7FnUgUcTLXQItwp3q2RYMXU4SPGTp27Fvjw65/thsaHCfDEfgmlit3CjTPzkglMmIjSCdm26MSCp27XBfpEH1V+bBCRnq7d+XhXkFRgy6USJ17n3Y7glTivC2px/ng= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=UVNe5BgS; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44LAfYSm022596; Tue, 21 May 2024 19:20:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=SrdXLGjWhEyhLmHl2VU7B djjuz3cIxz8d7WDLf2ZpKo=; b=UVNe5BgSSa4KvK42en+M4RG1mUa9rHksmUT2Q TTnga5CourquhX3erummiJphBwTQ67Wqby2zOmBp8ZBkA3/a20DriSMfGP+CENuB TjTClh9nI/aaCTnrkvNaaEO5pr+3e21wXOIhvCvdudu1de14k6C6RNs/IYXT4AsP rBTfqnElz90FZKckGk4FC2gTzVSa6cwUyn0gn9XooyBHcp0XnnpxcQ0D3AZZyeUt H7VR+qpHl2WWOwqXygrKuzmfRIOYhVYcOnVRvB+/bNhSYIbTmN79Y4EukDJia3Z5 bmNvXiazXx2PAAkCNFvpS/SnD72/Q2Q7Eagaw3T0J0cBKswVg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y6n4p7ewh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 May 2024 19:20:15 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44LJKEWL017029 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 May 2024 19:20:14 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 21 May 2024 12:20:14 -0700 Date: Tue, 21 May 2024 12:20:12 -0700 From: Bjorn Andersson To: Prabhav Kumar Vaish CC: , , , , , , Subject: Re: [PATCH next] drivers: soc: qcom: Auto cleanup using __free(device_node) Message-ID: References: <20240407072330.229076-1-pvkumar5749404@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240407072330.229076-1-pvkumar5749404@gmail.com> X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: rGYja5rtrC3DsK3WNhlK4vTpCVqyQzMs X-Proofpoint-GUID: rGYja5rtrC3DsK3WNhlK4vTpCVqyQzMs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-21_12,2024-05-21_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 spamscore=0 impostorscore=0 clxscore=1011 phishscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405210144 On Sun, Apr 07, 2024 at 12:53:30PM +0530, Prabhav Kumar Vaish wrote: > Use automated cleanup to replace of_node_put() in qcom_smem_resolve_mem(). > I don't find this easier to read or maintain. Also, your subject prefix does not match other changes to this driver. Regards, Bjorn > Signed-off-by: Prabhav Kumar Vaish > --- > drivers/soc/qcom/smem.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c > index 7191fa0c087f..ad1cf8dcc6ec 100644 > --- a/drivers/soc/qcom/smem.c > +++ b/drivers/soc/qcom/smem.c > @@ -1032,18 +1032,16 @@ static int qcom_smem_resolve_mem(struct qcom_smem *smem, const char *name, > struct smem_region *region) > { > struct device *dev = smem->dev; > - struct device_node *np; > struct resource r; > int ret; > + struct device_node *np __free(device_node) = of_parse_phandle(dev->of_node, name, 0); > > - np = of_parse_phandle(dev->of_node, name, 0); > if (!np) { > dev_err(dev, "No %s specified\n", name); > return -EINVAL; > } > > ret = of_address_to_resource(np, 0, &r); > - of_node_put(np); > if (ret) > return ret; > > -- > 2.34.1 >