From patchwork Fri Jun 19 12:01:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 11614019 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F41C814DD for ; Fri, 19 Jun 2020 12:03:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CAE472083B for ; Fri, 19 Jun 2020 12:03:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="X1takkdP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAE472083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmFkD-0000ij-0U for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Jun 2020 08:03:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmFj8-0006ng-4y for qemu-devel@nongnu.org; Fri, 19 Jun 2020 08:02:34 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:26484 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jmFj6-0006ij-Cf for qemu-devel@nongnu.org; Fri, 19 Jun 2020 08:02:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592568151; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mh585U2B/M9NmLNmH8i/bQ2gYzD5lB7pAuJmwaEMtsE=; b=X1takkdP2Tlr1h9gW7cCy/TZBjpMdfZ1SRYAAFp+zz71xHP58MSZIQ2rbUh3YEsYWgLe0K vFdnspK2JCoBbzqCMUcbp2wzEiYzuJjt1x4YFC9Wrt1xpGHHxAo0l8emBVh4dEcTzgP/5E iBA/ApD3++wlyOuacanU/KyixPOiLv0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-1qUVzBdaPOif51qCrZ322A-1; Fri, 19 Jun 2020 08:02:29 -0400 X-MC-Unique: 1qUVzBdaPOif51qCrZ322A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE90018FE861; Fri, 19 Jun 2020 12:02:28 +0000 (UTC) Received: from localhost (ovpn-113-212.ams2.redhat.com [10.36.113.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 670707C1EC; Fri, 19 Jun 2020 12:02:25 +0000 (UTC) From: Stefan Hajnoczi To: Coiby Xu Subject: [PATCH 6/6] block-helpers: update doc comment in gtkdoc style Date: Fri, 19 Jun 2020 13:01:57 +0100 Message-Id: <20200619120157.2422429-6-stefanha@redhat.com> In-Reply-To: <20200619120157.2422429-1-stefanha@redhat.com> References: <20200614183907.514282-4-coiby.xu@gmail.com> <20200619120157.2422429-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/19 01:50:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MIME_BASE64_TEXT=1.741, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, bharatlkmlkvm@gmail.com, qemu-devel@nongnu.org, Stefan Hajnoczi Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" QEMU uses the gtkdoc style for API doc comments. For examples, see include/qom/object.h. Fully document the function with up-to-date information (the min/max values were outdated). Signed-off-by: Stefan Hajnoczi --- util/block-helpers.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/util/block-helpers.c b/util/block-helpers.c index 9d12368032..c4851432f5 100644 --- a/util/block-helpers.c +++ b/util/block-helpers.c @@ -13,15 +13,17 @@ #include "qapi/qmp/qerror.h" #include "block-helpers.h" -/* - * Logical block size input validation +/** + * check_block_size: + * @id: The unique ID of the object + * @name: The name of the property being validated + * @value: The block size in bytes + * @errp: A pointer to an area to store an error * - * The size should meet the following conditions: - * 1. min=512 - * 2. max=32768 - * 3. a power of 2 - * - * Moved from hw/core/qdev-properties.c:set_blocksize() + * This function checks that the block size meets the following conditions: + * 1. At least MIN_BLOCK_SIZE + * 2. No larger than MAX_BLOCK_SIZE + * 3. A power of 2 */ void check_block_size(const char *id, const char *name, int64_t value, Error **errp)