Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1148473rwd; Thu, 25 May 2023 08:36:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7a44jwUfVa5jj7CzFitJMNta3NSJEleeWuBGzl03R8xpVMsRg3gSqzHyhUERQ9j9tq8Ky9 X-Received: by 2002:a17:902:8498:b0:1ae:762a:b660 with SMTP id c24-20020a170902849800b001ae762ab660mr1761781plo.39.1685028970639; Thu, 25 May 2023 08:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685028970; cv=none; d=google.com; s=arc-20160816; b=NCWOJS7pNTMU+CIh0decdMqQfY3r1Vop70UGiKsY7yiroOD4dn3DYpjW3fZ2I8Bsb0 S7g4Si+wq6299CvjzohlFinOTLidjiezyxY+2+F20mID40kokZyxp4iMbGME+98cEQtB sTuhwqySh/fl/TZwhVZLekysV4o1o4Ct1ZiKKhQfSSBrOdBWIFt95j+5/pFTBiziKRK7 HD10MBI9uIo1gggHkNaWzK9sv5uJgjgi5JyHgeM0bfoggFS4teHREdl1rsMtLQcS3O32 On/V/ZpadTVs/Ex325pOC1y0ZhiEiyK4GOUPdbx2bKdPWB5KYU8zjCe2HHyUinQZzR6D WK+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fOUzguOOu1eni0hOPBESb2FaTGC+gEEK2fy0+NLRd2Y=; b=yJwNHS7NSydDromGR8yNuNXQXtMBpYfvESkgrGAZsfWJ04crd4nKAjuO4oFSy/UquO 5UUgEPxc5hiqP7jRUFw493qZcl9ShDt/slaO4JStMQ8u/d9/uKvWR7WlwvudGKWMvxtN hF0dmMINjm526aEgiRwz3PZVO32IRY+EhyJRCJ4xym4D6TJ4h5RA3BqmlO/9rxbpuZwe rcVZ9MlyW523YDyA9QXZgpATmTyiUK3QkPJqKrzBJ7tMbB51usk6NZEoSXLarV+urWpr 89a9pts0vR0s53u2w2aaw0GLy5ADW/Jp9wkiLT1fHa9ShBTaqn48gSCiWPyWGl/tnqAM x5BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="a/742ry9"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a1709028c8d00b001aaf91ae3acsi1520077plo.485.2023.05.25.08.35.56; Thu, 25 May 2023 08:36:10 -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=@redhat.com header.s=mimecast20190719 header.b="a/742ry9"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241722AbjEYPS3 (ORCPT + 99 others); Thu, 25 May 2023 11:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233538AbjEYPS2 (ORCPT ); Thu, 25 May 2023 11:18:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1664E98 for ; Thu, 25 May 2023 08:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685027865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fOUzguOOu1eni0hOPBESb2FaTGC+gEEK2fy0+NLRd2Y=; b=a/742ry9r0lLvK8ERgjUlTwe2l4RJHJP/4RhRKbC/l4KRp1ud1GawS3hGRe42OzIC9WT9h gZbjZpFS/l9E/M6u8N0fMM6uCOzDoglx6a4bmqo1DGLbnft5JhidfSqpgG9RcPbQvBkyGE HL8UF7O2FrdZbecBg6w0kifuMYm1sDA= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587--50MNHoFOo2WRg_ymbLqZA-1; Thu, 25 May 2023 11:17:41 -0400 X-MC-Unique: -50MNHoFOo2WRg_ymbLqZA-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-30953bcb997so858498f8f.2 for ; Thu, 25 May 2023 08:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685027860; x=1687619860; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fOUzguOOu1eni0hOPBESb2FaTGC+gEEK2fy0+NLRd2Y=; b=CpGBuvquz9oh1AZmePUqd3DiQkDGd5VwGZoxowFssRFKc3Fp1EdW9sAsv7w24lj72m T8Ok5tkAMXMv3osT++QGDdBqPSUW0X3bb9Wjwmi1m/ihc/kA85VZmEV02nV5AGt2dLzG 67qzjjPS6aUZDh5uQzCxnve4TLvwjzb72aG6uEEG7OUFGyHpyfnSF1MnQ4HkfkhNmb52 t8Jhugp/+5gbYyQvfTuLoplmJKrGkym4RHF8jldhiYlJTA6UP/UnCnlOfQmwtwhrdpJP fJjcIiSMMmSXZjcv/4kcO9N4J8mfHrDWEl9s9PBOw0CSKtDTctd+9Ff+rdGHwXnTLYt/ L3Mw== X-Gm-Message-State: AC+VfDzbjl/URhZIEOAC/onXeayaSRSOi5wHoNQHqNI2EwtC1c6A3dIR TtUJKZ43wSqkPMWBu/CbsccruGSzuFJr7S15ft0X/0LWNJSSvWFCDntOEIYYAxP4+mRkLWfQvXI MRGjVh19J2JpzHKNwVmjsLtPr X-Received: by 2002:a5d:4212:0:b0:2ef:ba4f:c821 with SMTP id n18-20020a5d4212000000b002efba4fc821mr2822695wrq.36.1685027860657; Thu, 25 May 2023 08:17:40 -0700 (PDT) X-Received: by 2002:a5d:4212:0:b0:2ef:ba4f:c821 with SMTP id n18-20020a5d4212000000b002efba4fc821mr2822672wrq.36.1685027860264; Thu, 25 May 2023 08:17:40 -0700 (PDT) Received: from sgarzare-redhat ([217.171.68.36]) by smtp.gmail.com with ESMTPSA id g12-20020a5d488c000000b003090cb7a9e6sm2104222wrq.31.2023.05.25.08.17.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 08:17:39 -0700 (PDT) Date: Thu, 25 May 2023 17:17:36 +0200 From: Stefano Garzarella To: Simon Horman Cc: "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] virtio: Add missing documentation for structure fields Message-ID: References: <20230510-virtio-kdoc-v3-1-e2681ed7a425@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20230510-virtio-kdoc-v3-1-e2681ed7a425@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On Thu, May 25, 2023 at 04:35:42PM +0200, Simon Horman wrote: >Add missing documentation for the vqs_list_lock field of struct virtio_device, >and the validate field of struct virtio_driver. > >./scripts/kernel-doc says: > > .../virtio.h:131: warning: Function parameter or member 'vqs_list_lock' not described in 'virtio_device' > .../virtio.h:192: warning: Function parameter or member 'validate' not described in 'virtio_driver' > 2 warnings as Errors > >No functional changes intended. > >Signed-off-by: Simon Horman >--- >Changes in v3: >- As suggested by Stefano Garzarella > + Drop inline comment for @vqs_list_lock which is now covered by Kdoc > + Add "Returns 0 or -errno." to @validate Kdoc >- Link to v2: https://lore.kernel.org/r/20230510-virtio-kdoc-v2-1-1c5a20eb4cfe@kernel.org > >Changes in v2: >- As suggested by Michael S. Tsirkin > + @validate is not called on probe > + @validate does validates config space > + embarrassingly, validate was misspelt >- Link to v1: https://lore.kernel.org/r/20230510-virtio-kdoc-v1-1-d2b1824a9a2b@kernel.org >--- > include/linux/virtio.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/include/linux/virtio.h b/include/linux/virtio.h >index b93238db94e3..de6041deee37 100644 >--- a/include/linux/virtio.h >+++ b/include/linux/virtio.h >@@ -103,6 +103,7 @@ int virtqueue_resize(struct virtqueue *vq, u32 num, > * @config_enabled: configuration change reporting enabled > * @config_change_pending: configuration change reported while disabled > * @config_lock: protects configuration change reporting >+ * @vqs_list_lock: protects @vqs. > * @dev: underlying device. > * @id: the device type identification (used to match it with a driver). > * @config: the configuration ops for this device. >@@ -117,7 +118,7 @@ struct virtio_device { > bool config_enabled; > bool config_change_pending; > spinlock_t config_lock; >- spinlock_t vqs_list_lock; /* Protects VQs list access */ >+ spinlock_t vqs_list_lock; > struct device dev; > struct virtio_device_id id; > const struct virtio_config_ops *config; >@@ -160,6 +161,8 @@ size_t virtio_max_dma_size(const struct virtio_device *vdev); > * @feature_table_size: number of entries in the feature table array. > * @feature_table_legacy: same as feature_table but when working in legacy mode. > * @feature_table_size_legacy: number of entries in feature table legacy array. >+ * @validate: the function to call to validate features and config space. >+ * Returns 0 or -errno. > * @probe: the function to call when a device is found. Returns 0 or -errno. > * @scan: optional function to call after successful probe; intended > * for virtio-scsi to invoke a scan. > LGTM! Reviewed-by: Stefano Garzarella Thanks, Stefano