Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3648537pxb; Mon, 30 Aug 2021 07:25:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFKJIaTKaiVg1X46bsm06s+31pVKKNQptY81Qluvaxes6UDl8rTda16ch8WHrn2u9ABatW X-Received: by 2002:a17:906:3159:: with SMTP id e25mr25454620eje.549.1630333554129; Mon, 30 Aug 2021 07:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630333554; cv=none; d=google.com; s=arc-20160816; b=wIvVH0itkkbJ0Y+lx1pKR6a04EidSl+bPQlF/ASyhgsmy/efCCXv3OAUBbusii82fr M8ziDBPRJ844Z8bAl8GgQPMc402LxsAOkNWqTUfNiPZHuzN97P/qODii9pOX3K945xCr /jf96R3JJHe8/httr1q9brbQFPchD0EB0UOrLTLKKyBHmLse9HPViTPVMN8+Q/CB32LB RjbyqJCQyJj+uIfc8kM0Gz4MJDS/w1JbxVowPLeQ+Yy9IcDRey4Uj++4yX0eR2ox/tXM UKSMBbynUfcQEUa9pTzGcm7HD9Ru12P0bw5eF1aR/u+r0njG7OP0P2o4/ksx2G7RVBTv +JTQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bOb5vmojDqQCbnIcWiSlBRwm7/pGzlrCLVRi/6lo5DU=; b=qQp08fpn+UxDBzhN+U8m0H+AgJuYKFN+c7gatHbOMp8jdP/e0ixnzX/d5lUq3+dzVj Gmh+CukneIueHALXfEqAgZykVOIwBzVwABWOAhlwAHTQlCHUDBEsXiw+mAgHFfYoE49I AAmxfFoKhrNOok2osXfEVEbLAs9EExLcLg7J2kDWJuR1X5j3odF6jKB6xEYylvPfMwYI xnlA0JBTYOmo0b+89e+LYbf2GtCWUOd15/b7T/Ahv7Xf7AIw46Ze28CR5+26TOE8oWWH fPui78dAmZOOrSqzGJtRumG5MtZ5qbnHFr8N8vZycj1fJ5eghagErbh4nuiz3sRgyv+C vtcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=dTsAhtQq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si8351288edr.278.2021.08.30.07.25.31; Mon, 30 Aug 2021 07:25:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=dTsAhtQq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237308AbhH3OXN (ORCPT + 99 others); Mon, 30 Aug 2021 10:23:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237257AbhH3OXI (ORCPT ); Mon, 30 Aug 2021 10:23:08 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15CD5C06129D for ; Mon, 30 Aug 2021 07:22:09 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id u11-20020a17090adb4b00b00181668a56d6so94329pjx.5 for ; Mon, 30 Aug 2021 07:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bOb5vmojDqQCbnIcWiSlBRwm7/pGzlrCLVRi/6lo5DU=; b=dTsAhtQq0wA+bieSGEDhFMrmBS/2eabwLraiL/FPpYegbrEJYy8SPUl32+FEZA8XPa GPzu6BH5ZUc0aGLJSj2InZ9rOImL7p0Z17+KZtU77QqhNDsul6JaCQGjYDdkzteIg6dY A62QHOr3RDnu2yPmfoD33iAgUfhLuIdDhZVkILskgC/KWD4gnibrlbu9NLxd+C+19mrp G7rSYf4k15oZRsKBY20xXZJErD9GYCVpKtdd53re59ym5GgcTXtcKvn7KVKI2RZWXQ4t EW4CzI/NkZ9FSf0lEhr76H5Fn/2sgHktT8riiAHOtBkdW/RPyTy6rDwWYP9n/zLItfC7 0D4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bOb5vmojDqQCbnIcWiSlBRwm7/pGzlrCLVRi/6lo5DU=; b=CTjhocjWzfYeV3PvZ/V4qSMHV1R5wgIU31HLYMytI570S5WVdEfJzYRXYNifY9TcGf s+ONyja86Yva6vNfntj1WKg3dAh2o0wb1Q7d0Z3ZSlaPOoxhmOLjU3TPdQfeGHoP/CRL h6+IgjJfqjno7uqpp0ihIkBPjqn8JHwvhuL+qITXfVITJ8DOeMxH4waiF7kmxB7l7eqb e/pI5VOS6BsKeaPP7bum05glhRA49XlnNq6uRrm5HVTan5frElrHtk74ScU7G+0Smjhu qW0UVfx/v92OcHrcvVIXaqT5E9wjrPj/okdWgXz/opRbN00HUtLkNIlbFaXk3TCdcsh0 UCTw== X-Gm-Message-State: AOAM533Bzx/869d6ClQ1iGSkvGv+N0TEtTmmvhx04HJjQsAfNiJ1XOe9 K7dPT5Nfod9gqeircxgXIbQA X-Received: by 2002:a17:90a:19da:: with SMTP id 26mr32350111pjj.198.1630333328548; Mon, 30 Aug 2021 07:22:08 -0700 (PDT) Received: from localhost ([139.177.225.237]) by smtp.gmail.com with ESMTPSA id gc20sm10539889pjb.17.2021.08.30.07.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 07:22:08 -0700 (PDT) From: Xie Yongji To: mst@redhat.com, jasowang@redhat.com, stefanha@redhat.com, sgarzare@redhat.com, parav@nvidia.com, hch@infradead.org, christian.brauner@canonical.com, rdunlap@infradead.org, willy@infradead.org, viro@zeniv.linux.org.uk, axboe@kernel.dk, bcrl@kvack.org, corbet@lwn.net, mika.penttila@nextfour.com, dan.carpenter@oracle.com, joro@8bytes.org, gregkh@linuxfoundation.org, zhe.he@windriver.com, xiaodong.liu@intel.com, joe@perches.com, robin.murphy@arm.com, will@kernel.org, john.garry@huawei.com Cc: songmuchun@bytedance.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, kvm@vger.kernel.org, linux-fsdevel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v12 04/13] vdpa: Fix some coding style issues Date: Mon, 30 Aug 2021 22:17:28 +0800 Message-Id: <20210830141737.181-5-xieyongji@bytedance.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210830141737.181-1-xieyongji@bytedance.com> References: <20210830141737.181-1-xieyongji@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix some code indent issues and following checkpatch warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' 371: FILE: include/linux/vdpa.h:371: +static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset, Signed-off-by: Xie Yongji Acked-by: Jason Wang Reviewed-by: Stefano Garzarella --- include/linux/vdpa.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 8cfe49d201dd..8ae1134070eb 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -43,17 +43,17 @@ struct vdpa_vq_state_split { * @last_used_idx: used index */ struct vdpa_vq_state_packed { - u16 last_avail_counter:1; - u16 last_avail_idx:15; - u16 last_used_counter:1; - u16 last_used_idx:15; + u16 last_avail_counter:1; + u16 last_avail_idx:15; + u16 last_used_counter:1; + u16 last_used_idx:15; }; struct vdpa_vq_state { - union { - struct vdpa_vq_state_split split; - struct vdpa_vq_state_packed packed; - }; + union { + struct vdpa_vq_state_split split; + struct vdpa_vq_state_packed packed; + }; }; struct vdpa_mgmt_dev; @@ -131,7 +131,7 @@ struct vdpa_iova_range { * @vdev: vdpa device * @idx: virtqueue index * @state: pointer to returned state (last_avail_idx) - * @get_vq_notification: Get the notification area for a virtqueue + * @get_vq_notification: Get the notification area for a virtqueue * @vdev: vdpa device * @idx: virtqueue index * Returns the notifcation area @@ -350,25 +350,25 @@ static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev) static inline void vdpa_reset(struct vdpa_device *vdev) { - const struct vdpa_config_ops *ops = vdev->config; + const struct vdpa_config_ops *ops = vdev->config; vdev->features_valid = false; - ops->set_status(vdev, 0); + ops->set_status(vdev, 0); } static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features) { - const struct vdpa_config_ops *ops = vdev->config; + const struct vdpa_config_ops *ops = vdev->config; vdev->features_valid = true; - return ops->set_features(vdev, features); + return ops->set_features(vdev, features); } - -static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset, - void *buf, unsigned int len) +static inline void vdpa_get_config(struct vdpa_device *vdev, + unsigned int offset, void *buf, + unsigned int len) { - const struct vdpa_config_ops *ops = vdev->config; + const struct vdpa_config_ops *ops = vdev->config; /* * Config accesses aren't supposed to trigger before features are set. -- 2.11.0