[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 09/11] xen/arm: smmuv3: Use fallthrough pseudo-keyword


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Sat, 9 Jan 2021 18:57:59 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yBRUDxhFFsrNYP9jnQ5IR4tfq/uqzetuyFrSvvv/CtY=; b=erILjrtu9x5baST69I3Rd31x+3qVjrQFvPJstHbO2uuY3miEabb+e3kab2vuglxcZpq+rovgl166D/YDmKdd7DMed8Aw7uKdkPR+ZVaT52jGHVr0DgK0JMBQVfQ7PfyKZEi3VfL/A0mUDTeraxTG+nTB9NO5Jip5NcCWmvE3KSs727gWRNXqzBkX0IIuiRxchD0HgPH/Aj7a+Ee/CGCV7WDjaXOVqG+WO4xHjePNcGGjYiHl5SMbsZ+Kwc41VXRqplb35EvctVjGYO/6m+D5AoNb/bajsOth7hreJ18m6Tko9CBQpDgqK4R+6j9y/+/F32h/P4cloW9Rgj4CQrMwTw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MEfoFbjkKJjPtD+lXjUojAgtw0obrUqVq5es1UFyerLy3eDCbFzA/jgeOp8+o0AuvdlKrNUmAuUzc/tHwpsaEjgu/6sdgj4lL1NTphwnhUI3ZrnazQM9YPB3aS/RFTLSgiQYVady1OIFsyUMvrsXQXFaVWZ+3cRovoFQu2/pgz4HXV7PHDHkYzARBxni1GtQjT9R8xZ13A1MqcH+LJG6RWl92W0d+7GSb9gDufls2O9vrUwHtlHulFC9fidnhLUM7RNtMucd1rGlXrAhBiUIN1qQX63K+L10nBCW44+wVukxd+ugL/RPuZhL+J22GcpvYzSGGee7lSK2f/YNPXZm3Q==
  • Authentication-results-original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Sat, 09 Jan 2021 18:58:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHW5c3lM8m+gSvX8UGq06ErkkqKrKoehnIAgAEgogA=
  • Thread-topic: [PATCH v4 09/11] xen/arm: smmuv3: Use fallthrough pseudo-keyword

Hello Stefano,

Thanks for reviewing the series.

> On 9 Jan 2021, at 1:44 am, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> On Fri, 8 Jan 2021, Rahul Singh wrote:
>> Merge the patch from linux to use fallthrough pseudo-keyword.
>> 
>> Replace the existing /* fall through */ comments and its variants with
>> the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
>> fall-through markings when it is the case.
>> 
>> Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
>> ---
>> Changes in V4:
>> - This patch is introduce in this verison.
>> ---
>> xen/drivers/passthrough/arm/smmu-v3.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>> 
>> diff --git a/xen/drivers/passthrough/arm/smmu-v3.c 
>> b/xen/drivers/passthrough/arm/smmu-v3.c
>> index 5ce14850b4..f5f8b4c981 100644
>> --- a/xen/drivers/passthrough/arm/smmu-v3.c
>> +++ b/xen/drivers/passthrough/arm/smmu-v3.c
>> @@ -932,7 +932,6 @@ static void arm_smmu_cmdq_skip_err(struct 
>> arm_smmu_device *smmu)
>>               */
>>              return;
>>      case CMDQ_ERR_CERROR_ILL_IDX:
>> -            /* Fallthrough */
> 
> The fallthrough keyword is unnecessary here because of default, right?

Yes you are right fallthrough keyword is unnecessary here because  
"-Wimplicit-fallthrough” will not through the warning when a case label falls 
through to a case that breaks or returns.Therefore there is no need to have the 
fallthrough keyword here.

Regards,
Rahul

> 
> 
>>      default:
>>              break;
>>      }
>> @@ -2488,7 +2487,7 @@ static int arm_smmu_device_hw_probe(struct 
>> arm_smmu_device *smmu)
>>      switch (FIELD_GET(IDR0_STALL_MODEL, reg)) {
>>      case IDR0_STALL_MODEL_FORCE:
>>              smmu->features |= ARM_SMMU_FEAT_STALL_FORCE;
>> -            /* Fallthrough */
>> +            fallthrough;
>>      case IDR0_STALL_MODEL_STALL:
>>              smmu->features |= ARM_SMMU_FEAT_STALLS;
>>      }
>> @@ -2505,7 +2504,7 @@ static int arm_smmu_device_hw_probe(struct 
>> arm_smmu_device *smmu)
>>      switch (FIELD_GET(IDR0_TTF, reg)) {
>>      case IDR0_TTF_AARCH32_64:
>>              smmu->ias = 40;
>> -            /* Fallthrough */
>> +            fallthrough;
>>      case IDR0_TTF_AARCH64:
>>              break;
>>      default:
>> @@ -2589,7 +2588,7 @@ static int arm_smmu_device_hw_probe(struct 
>> arm_smmu_device *smmu)
>>      default:
>>              dev_info(smmu->dev,
>>                      "unknown output address size. Truncating to 48-bit\n");
>> -            /* Fallthrough */
>> +            fallthrough;
>>      case IDR5_OAS_48_BIT:
>>              smmu->oas = 48;
>>      }
>> -- 
>> 2.17.1


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.