From patchwork Tue Feb 27 15:53:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 207297 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2787568dyb; Tue, 27 Feb 2024 07:56:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW8++jsnHw1uHoj5dl99GPIC4P3QXe3d+qjUr42UC3G1r80yEaky/GA+T68xd8UV6KBOswL7xoF8flw/u9gGTCtXKYiIQ== X-Google-Smtp-Source: AGHT+IHCpMlfiUr+qh7RpAGigt+bfWpc1gT2IXFPi9ksftUNIGkScQRV9dxvNwLXD1CMezwThCRw X-Received: by 2002:a05:6a00:5d:b0:6e5:6d2:234b with SMTP id i29-20020a056a00005d00b006e506d2234bmr6950668pfk.0.1709049411821; Tue, 27 Feb 2024 07:56:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709049411; cv=pass; d=google.com; s=arc-20160816; b=eazrXySpaHT9O3z6f9DbRozXACiRjvpVWEZjESZ2q7Svj2n4GZqxeztxLwxCOQcH0n SyCH8o00IrhJkr5TDOqZFG0DPJ5S64V8TReJIRzOXAZYi+Fv7BaWKfIy+mnnIkSJPesV 9/8kIsKFm3Nj7yNhnXpD6hF6qpsXcwhQ7h9BvqRAgPa5+zY2ewBeWPc/ho9sdEkzx2vU XWTrZ5jjNGHxiiBsrpEusYY62hWJxMqI+iDZg6rO/AZviRkdLZWWZo3QVGvBKCIAosVo MWMx7n+Q/4lcUHTz9GMaCqFiJWtThJSw33Re0/8TAy5Gv12BkhE6AtBtiId+dX4lpqIB ml6g== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gwUiJkIqL4nokAQI8FJ5IuA+Yowem9nNNMwwaK+yUv0=; fh=v/J7FZ7kroLF8arNv1lU638DioI58lxpdVQAXxWjgAc=; b=wRqqYykRYJDQITlL/r4toagzUDvecJ38/mdwcTDaFTVEQOq7NLzNKW4BDET7jz3daJ 18n62GyBQaDlm0eiilYAYIeokhTE6jYAePOHK3du4ER+2JCfGVEg3FsxbXBsx0DUA6Dv M0DgcgDUT6WBSqUR16+faO619sxDYHUEf8rIT9J+qQ3j2YvZizOMPKIUQ9rCylSR3DqO sdk1983U1MJgRRA1S9kKhiU7qKt3+n6BFOzTLWdJB8fuLwMJVkQM2bKiE8uKXblm3wp4 RopmFkwLLBHQsVQka5uokNoYtxv+qk7UFnXdtiMe2qgdCiu1r5CbsoawSy5nBFAao7HQ vfAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=L9V4CRZk; 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-83552-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83552-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f8-20020a056a00228800b006e550efa3eesi645731pfe.181.2024.02.27.07.56.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 07:56:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83552-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=L9V4CRZk; 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-83552-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83552-ouuuleilei=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 7BA012852E8 for ; Tue, 27 Feb 2024 15:55:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5B4A14AD23; Tue, 27 Feb 2024 15:53:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="L9V4CRZk" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 8468B149000; Tue, 27 Feb 2024 15:53:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709049231; cv=none; b=d85P2rMXvjKomIi8yAONaoctulm5v5xgv8j9pB0hBCBQn8O4M3WWRoVGrBwp5AghvF/XNMJlR9Tmhjac3b9xPyqLLAB+Y6XN8Uda8u63JTW1fG3ZXatdMF3pouVWAKpc/b0Qeo79ueVXRiC7xArZcO0AxalkfDkxVj5QOQ6d1cw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709049231; c=relaxed/simple; bh=CQNAuyTRM2K+tQB53tmQS1x2t4PZd2hpfvo2JMyAks4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XdP523hjL14aoiPxOt7Jc9W+Py01soZk1QrdPMx9nNoVgdIxsss7UurcvUHapaxdyadWTwMp0Ark6C5HvDwpNhF82wg0+HNE/xqoI7quAmy7dQqBv8+z2LWD/VpN+RfBpOfk2x689c8kibrS7IPtBHdJpuzSWMeIk6vVqcxGnfM= 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=L9V4CRZk; arc=none smtp.client-ip=205.220.168.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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41RERJCL026934; Tue, 27 Feb 2024 15:53:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=gwUiJkIqL4nokAQI8FJ5IuA+Yowem9nNNMwwaK+yUv0=; b=L9 V4CRZk+oaqcDMn7an5oUVFDfcwIYMeqOh1+0wKtypphLYg+L5sEwvBragnbx+rUC cELrpLFThv6OktS5an2Zu3/7gjIbT+SXHTEjIKeuidQg9GbMph+/Xil/VSaHWZ6x qwbvC1DzoRtkPAexVhg/ZyOHt+B6qn7QsUfwEDB+Co5CjQvfDFgeJ/fcxsPDQOr7 l1lKqIleYKqhoIvOslZMwmdjQIItR/ym/HG2gbDt/vZd5n5Hqngby9kVlXAba+a4 yWGTKqhAwalWAi26MI/fumeWyoKyUM/cKEnTHaEZ6xzKW/fdFsYh8uU8liPEi717 ZbNXl94DS+Qff1DjjY9g== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wh8auhhy6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 15:53:46 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41RFrkrY012029 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 15:53:46 GMT Received: from hu-mojha-hyd.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 27 Feb 2024 07:53:43 -0800 From: Mukesh Ojha To: , CC: , , , , Mukesh Ojha Subject: [PATCH v12 6/9] firmware: qcom: scm: Remove log reporting memory allocation failure Date: Tue, 27 Feb 2024 21:23:05 +0530 Message-ID: <20240227155308.18395-7-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.43.0.254.ga26002b62827 In-Reply-To: <20240227155308.18395-1-quic_mojha@quicinc.com> References: <20240227155308.18395-1-quic_mojha@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: PQ9POfKZ2x1o9oeNxfAkbq-US4XAGcss X-Proofpoint-GUID: PQ9POfKZ2x1o9oeNxfAkbq-US4XAGcss X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-27_01,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 bulkscore=0 suspectscore=0 phishscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402270122 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792068196287417638 X-GMAIL-MSGID: 1792068196287417638 Remove redundant memory allocation failure. WARNING: Possible unnecessary 'out of memory' message + if (!mdata_buf) { + dev_err(__scm->dev, "Allocation of metadata buffer failed.\n"); Signed-off-by: Mukesh Ojha Reviewed-by: Bjorn Andersson --- drivers/firmware/qcom/qcom_scm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c index 3fd89cddba3b..6c252cddd44e 100644 --- a/drivers/firmware/qcom/qcom_scm.c +++ b/drivers/firmware/qcom/qcom_scm.c @@ -598,10 +598,9 @@ int qcom_scm_pas_init_image(u32 peripheral, const void *metadata, size_t size, */ mdata_buf = dma_alloc_coherent(__scm->dev, size, &mdata_phys, GFP_KERNEL); - if (!mdata_buf) { - dev_err(__scm->dev, "Allocation of metadata buffer failed.\n"); + if (!mdata_buf) return -ENOMEM; - } + memcpy(mdata_buf, metadata, size); ret = qcom_scm_clk_enable();