Message ID | 20161026190504.9888-37-lersek@redhat.com |
---|---|
State | Accepted |
Commit | 10da3a156ff7d24ace6113de323ffc515506d6de |
Headers | show |
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> >-----Original Message----- >From: Laszlo Ersek [mailto:lersek@redhat.com] >Sent: Thursday, October 27, 2016 3:05 AM >To: edk2-devel-01 <edk2-devel@ml01.01.org> >Cc: Ni, Ruiyu <ruiyu.ni@intel.com> >Subject: [PATCH 36/47] OptionRomPkg/AtapiPassThruDxe: rebase to ARRAY_SIZE() > >Cc: Ruiyu Ni <ruiyu.ni@intel.com> >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Laszlo Ersek <lersek@redhat.com> >--- > OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c >index 3578a1e4459c..e2654e5c2566 100644 >--- a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c >+++ b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c >@@ -1752,7 +1752,7 @@ Returns: > UINT8 ArrayLen; > > OpCode = (UINT8 *) (Packet->Cdb); >- ArrayLen = (UINT8) (sizeof (gSupportedATAPICommands) / sizeof (gSupportedATAPICommands[0])); >+ ArrayLen = (UINT8) (ARRAY_SIZE (gSupportedATAPICommands)); > > for (Index = 0; (Index < ArrayLen) && (CompareMem (&gSupportedATAPICommands[Index], &gEndTable, sizeof >(SCSI_COMMAND_SET)) != 0); Index++) { > >@@ -1995,7 +1995,7 @@ Returns: > UINT8 ArrayLen; > > OpCode = (UINT8 *) (Packet->Cdb); >- ArrayLen = (UINT8) (sizeof (gSupportedATAPICommands) / sizeof (gSupportedATAPICommands[0])); >+ ArrayLen = (UINT8) (ARRAY_SIZE (gSupportedATAPICommands)); > > for (Index = 0; (Index < ArrayLen) && (CompareMem (&gSupportedATAPICommands[Index], &gEndTable, sizeof >(SCSI_COMMAND_SET)) != 0); Index++) { > >-- >2.9.2 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c index 3578a1e4459c..e2654e5c2566 100644 --- a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c +++ b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c @@ -1752,7 +1752,7 @@ Returns: UINT8 ArrayLen; OpCode = (UINT8 *) (Packet->Cdb); - ArrayLen = (UINT8) (sizeof (gSupportedATAPICommands) / sizeof (gSupportedATAPICommands[0])); + ArrayLen = (UINT8) (ARRAY_SIZE (gSupportedATAPICommands)); for (Index = 0; (Index < ArrayLen) && (CompareMem (&gSupportedATAPICommands[Index], &gEndTable, sizeof (SCSI_COMMAND_SET)) != 0); Index++) { @@ -1995,7 +1995,7 @@ Returns: UINT8 ArrayLen; OpCode = (UINT8 *) (Packet->Cdb); - ArrayLen = (UINT8) (sizeof (gSupportedATAPICommands) / sizeof (gSupportedATAPICommands[0])); + ArrayLen = (UINT8) (ARRAY_SIZE (gSupportedATAPICommands)); for (Index = 0; (Index < ArrayLen) && (CompareMem (&gSupportedATAPICommands[Index], &gEndTable, sizeof (SCSI_COMMAND_SET)) != 0); Index++) {
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel