From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web10.22165.1661422515408047415 for ; Thu, 25 Aug 2022 03:15:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=D/MJnR8z; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: quicinc.com, ip: 205.220.180.131, mailfrom: quic_llindhol@quicinc.com) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27P4ErbS010439; Thu, 25 Aug 2022 10:15:14 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=lzDa6QUzSqCZQCL73TMS0ALgCmx2VHdt8gaoj0woxdg=; b=D/MJnR8zxjIfMdSNdGlfwMvXLAMLWKNVMkOPCnBWYnHMyi7z2VsZDUVKChlijSJOJDlb Ufm8Hl6loH6aN7soCJ5tuUmM2xDX8SUsbisnQEq8X8hiGtW4EnXZ2ivj9bP1Yc+4K2yt 4OX6PaCiwoYrLGsnn9wWCy7wDLYp/6tXlPdDIfmYI8dtWu/EQX+WdbbpT4aeoRmeatzs vc8v3nOMRCkQ5ho9qmZoj8508kq3I5sJaHc9cD95R4lJsiVph1WcueMMgamP6VSJrFta iD9wLkdyGFE9yLQWbcVjBxcUWW6c5dXObhF8x3n2wk65WbAt1GHUEJ5sj3jr8m12KNpU gA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j5w5jhjbu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Aug 2022 10:15:14 +0000 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 27PAFDIv013549 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Aug 2022 10:15:13 GMT Received: from qc-i7.hemma.eciton.net (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.986.29; Thu, 25 Aug 2022 03:15:12 -0700 Date: Thu, 25 Aug 2022 11:15:09 +0100 From: "Leif Lindholm" To: , CC: Ard Biesheuvel , Ard Biesheuvel Subject: Re: [edk2-devel] [PATCH v2 1/8] ArmPlatformPkg/NorFlashDxe: Remove unused debug print specifier Message-ID: References: <20220825034824.4044-1-mikuback@linux.microsoft.com> <20220825034824.4044-2-mikuback@linux.microsoft.com> MIME-Version: 1.0 In-Reply-To: <20220825034824.4044-2-mikuback@linux.microsoft.com> X-Originating-IP: [10.80.80.8] 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: 8oDKHXhL_Iudc5jXGkrP934vgP4s5PiG X-Proofpoint-GUID: 8oDKHXhL_Iudc5jXGkrP934vgP4s5PiG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-25_05,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 adultscore=0 priorityscore=1501 clxscore=1011 phishscore=0 mlxscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208250040 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Wed, Aug 24, 2022 at 23:48:17 -0400, Michael Kubacki wrote: > From: Michael Kubacki > > These debug messages are repeated in both NorFlashBlockIoReadBlocks() > and NorFlashBlockIoWriteBlocks(): > > "NorFlashBlockIoWriteBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x" > "bytes (%d kB), BufferPtr @ 0x%08x)\n" > > Although this requires 5 arguments, only 4 are provided. The kilobyte > value was never given. > > This change removes that specifier so the 4 arguments match the 4 > specifiers in the debug macro. > > Cc: Leif Lindholm > Cc: Ard Biesheuvel > Signed-off-by: Michael Kubacki > Reviewed-by: Ard Biesheuvel > --- > ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c > index 5afab0a79fa2..e671108e2bcf 100644 > --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c > +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c > @@ -54,7 +54,7 @@ NorFlashBlockIoReadBlocks ( > Instance = INSTANCE_FROM_BLKIO_THIS (This); > Media = This->Media; > > - DEBUG ((DEBUG_BLKIO, "NorFlashBlockIoReadBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x bytes (%d kB), BufferPtr @ 0x%08x)\n", MediaId, Lba, BufferSizeInBytes, Buffer)); > + DEBUG ((DEBUG_BLKIO, "NorFlashBlockIoReadBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x bytes, BufferPtr @ 0x%08x)\n", MediaId, Lba, BufferSizeInBytes, Buffer)); > Line last touched 2013-01-25, which was a line ending fix on top of the creation of ArmPlatformPkg on 2011-02-01. I mean on the positive side, no one would appear to have needed to debug BLKIO since then. I'm not going to bikeshed, but I'm going to mention the bikeshedding point that the original mistake made was in not repeating BufferSizeInBytes in the argument list. Make of this what you will - either way Reviewed-by: Leif Lindholm > if (!Media) { > Status = EFI_INVALID_PARAMETER; > @@ -89,7 +89,7 @@ NorFlashBlockIoWriteBlocks ( > > Instance = INSTANCE_FROM_BLKIO_THIS (This); > > - DEBUG ((DEBUG_BLKIO, "NorFlashBlockIoWriteBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x bytes (%d kB), BufferPtr @ 0x%08x)\n", MediaId, Lba, BufferSizeInBytes, Buffer)); > + DEBUG ((DEBUG_BLKIO, "NorFlashBlockIoWriteBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x bytes, BufferPtr @ 0x%08x)\n", MediaId, Lba, BufferSizeInBytes, Buffer)); > > if ( !This->Media->MediaPresent ) { > Status = EFI_NO_MEDIA; > -- > 2.28.0.windows.1 > > > > > >