From patchwork Fri Oct 21 06:27:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Shaoqin" X-Patchwork-Id: 462 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp521560wrr; Thu, 20 Oct 2022 23:33:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7PKKS2tzITDtK2kIdew5S5I/uxDWmxHTM9DQ35tihUbb5d+lbcbg3qhT7ltNecI0vWj0B6 X-Received: by 2002:aa7:d651:0:b0:459:d1c:394e with SMTP id v17-20020aa7d651000000b004590d1c394emr16129105edr.10.1666334001761; Thu, 20 Oct 2022 23:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666334001; cv=none; d=google.com; s=arc-20160816; b=UMgek6PYf61KZylNZpNh31roUYs6Pa53gqydllgP6rbBONYaOTQn6VlvmiPtK6Qd2I 3Zljz8zc0QUBoihGZc+5L6ZkLNDdChxQDVV6bXSlcvWMr6wt28SlOLG6kziflfKVNgyX dqKv03ljlgDb+SYb4cjJTJhpGnI7KdPJXdi9f6VJILUFjGxKS0IiIYQRj1erGYkMF1Ms moZK/TZmb45HeqYMotQx1Kt6wGCrUoUEoOX82RMCKo9228uYxJC97nxkPR//jmhOhAOt I9UXqXITsm0lRqXtcwWZ4l7MDhsOLuxZ1IdYHHWtzITn7sN96g7v+v1n+rKmR+XfoQIN oWRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GEvFN9qGKK7SocuHMl1lH82QaLADlShqsvnWE++rOZ0=; b=AajXj0GLYfIC4O19gQqbJFKxhypZW34BYRC6/aYdqmPlvEVNLlYYI5SdzCD3oL7wBr BAjjpCOU05zRWR76V78JokhzmK+qf8N/JHcIfTEEXejl74cClGuRMngnEape/AADasuM eycDVvQ+HYqLhfnM8yv9SOqtYfCXRPdi2ote1KZVRpD5QplUWeiSW533Ij6HGphG8HYl mvDRDnyHX9GBtMjVv5+iMwT9/nLVgpwrBaYxBmxz4dKwWP53ZWkD/wqvY8t/Aa1FT9FR SjMwdEjcrtHAToAHvGNMV20aYUaR7gL1kM7FwYznlnCafp/C/Yxd0NdWCjyNmhuIwRBI pxvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=loSRt9ok; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp34-20020a1709071b2200b0078c6abf19bfsi16489102ejc.948.2022.10.20.23.32.50; Thu, 20 Oct 2022 23:33:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=loSRt9ok; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbiJUG1n (ORCPT + 99 others); Fri, 21 Oct 2022 02:27:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiJUG1j (ORCPT ); Fri, 21 Oct 2022 02:27:39 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47D30239231 for ; Thu, 20 Oct 2022 23:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666333659; x=1697869659; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JR2Ej9sMDTPdzXZaqlO8V8artslbt8VzaADI4VUIdSo=; b=loSRt9ok+i7w/m1NERwALAJhASf94hpXLkxoYdCB+YCPvhRjvZtHXv4k RZ0odjgxNWvn/ACfxe9jahkySXBoB6y3IufPIcM4DCRPl6GW2+QQYPBvh +chNPRWMvkKS9/4T9kTNpae+FNnSDlx/g4ndTtMrm4aX0CTIARCLSm8Qd WstRmJlC/GImHusuLDc2kZtQOGBume64N/YLINClkL4oWn72AdxEA34Pz TkKm71+eKzl72hwbvpYZshlDDjIJnQmteB6mZ7isgM3NVXwNphvqXv4Ge 4J36KpfYpPdI2KGsFygC/fUWx2BhQXxiNDrswNAOR0ma2irbXPGGliBW9 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="286642398" X-IronPort-AV: E=Sophos;i="5.95,200,1661842800"; d="scan'208";a="286642398" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 23:27:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="735358026" X-IronPort-AV: E=Sophos;i="5.95,200,1661842800"; d="scan'208";a="735358026" Received: from d8bbc18b98c6.jf.intel.com ([10.54.241.152]) by fmsmga002.fm.intel.com with ESMTP; 20 Oct 2022 23:27:38 -0700 From: shaoqin.huang@intel.com To: mst@redhat.com, jasowang@redhat.com Cc: Shaoqin Huang , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH 0/2] virtio: use helper function is_power_of_2() Date: Thu, 20 Oct 2022 23:27:32 -0700 Message-Id: <20221021062734.228881-1-shaoqin.huang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747277842538131961?= X-GMAIL-MSGID: =?utf-8?q?1747277842538131961?= From: Shaoqin Huang Use helper function is_power_of_2() to check if num is power of two. Minor readability improvement. Shaoqin Huang (2): virtio_pci: use helper function is_power_of_2() virtio_ring: use helper function is_power_of_2() drivers/virtio/virtio_pci_modern.c | 2 +- drivers/virtio/virtio_ring.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)