Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp309305imn; Thu, 4 Aug 2022 06:54:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR5sagNOBdchSQRHJiBFJGesTI07XipkFBF5HfK+FNm9w6aAj0+80KC8npUrBGYSZV/RVnX4 X-Received: by 2002:a17:907:d8b:b0:72f:4645:1730 with SMTP id go11-20020a1709070d8b00b0072f46451730mr1537522ejc.724.1659621256704; Thu, 04 Aug 2022 06:54:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659621256; cv=pass; d=google.com; s=arc-20160816; b=YJ+i+xvhQlZmAs2oZ1oslsM8O5MLtKy+nKp+QNNO2q90hhLX2ruqzfPk6+PudlaE+z J0lraSihnvOFaa5A9WyI/8QMojhLte24TuKrHLbZLXp/R67O1H8tJTKyNmQgF5zcLDdp YF0BLZO7Pylt4s+w6E+yqcjTID/xorhpgDqorfb3P+7oRIJN8CAu02x1ZnB3d74jLzjT JgQqwH5S3TPMgz70QxaUUKyGwfXounIoeI0GJlzYeNvJQH9LBFCfpGmCQbY7fLSWITAQ x64/ff+Ey2KxtXzmTw6g6E7bqwR3lVbxfmrhS3eWhOB6gt45Ck3a/53t2gnsUOHP6ymv f59w== ARC-Message-Signature: i=2; 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:date:subject:message-id:cc:to:from :dkim-signature; bh=ML2EqkeHNsgj3TjKde7zyuOTBKOcYW9uCOulr/NrERw=; b=Vmvz8wmxCUoD+eek5spi2bilD5B0knJQ9KAzMbqJIAB/xrjMDjsuOf0JYEs5LlNCu4 3dBGaPqfTGp9Rxrte+1qW/CqR3BoRGL5tCnbAK7ovETYz6u2q6WBIu0o0F6X2BZjcCJY 2OMkv5NGHAq8DNDalXvDXoEb41inI3eHoGB/wTf4W9ASEjl1b4iNnoHkUsdG3I3jYwp1 8ewYaWS1iQqCYoWsMBlJPZiyJn+fgCjuc8H+FEEQAF6qwj+RB7OS+IpBhgTnXp+wLwgG GQTNo4zeQFuwkEY8OKp6a5Aaxs6QgB0kfqmAhRqC/B6fK5EHW4iahFOYoOIM4fVya0+C A2Rw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=iOPoGrRI; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=REJECT sp=REJECT dis=NONE) header.from=siddh.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gj6-20020a170907740600b007307f95bc5dsi759664ejc.383.2022.08.04.06.53.52; Thu, 04 Aug 2022 06:54:16 -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=@siddh.me header.s=zmail header.b=iOPoGrRI; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=REJECT sp=REJECT dis=NONE) header.from=siddh.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239849AbiHDNcJ (ORCPT + 99 others); Thu, 4 Aug 2022 09:32:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbiHDNcE (ORCPT ); Thu, 4 Aug 2022 09:32:04 -0400 Received: from sender-of-o53.zoho.in (sender-of-o53.zoho.in [103.117.158.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D21E3D5AD for ; Thu, 4 Aug 2022 06:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659619870; cv=none; d=zohomail.in; s=zohoarc; b=Q2ub6m9aXLeA4anYH/ssE1c1c5p5f0KYhUQW7SWGpRY5bRaCcWoLbELYckVz3zNmbVBPcRirxdPZ0IZTKi8jN+fqoGnWLkX5iVNcyw4CMN+IcNE9BTOEULiKoCbdLm0s7KzkYWMqHrvMH7pRCCn8yUWMwqddHTW0r7VFuZv4470= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1659619870; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ML2EqkeHNsgj3TjKde7zyuOTBKOcYW9uCOulr/NrERw=; b=VumQp9GlQJAVdZoNgv7hWqG33TBtUGfyarYgiTklkHdvx1dadwucNhF1nTa4qfvyq5L2sULKeGOu+/aRIJJgIBxiw4RFMpbZjv5K4RtUZsycwW4hVdJneTBmcSzU2w+LVMK4ImE1TZ4CM0uIiQ3ZoCJOXP5UdSuHHmj+V/TgVVA= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1659619870; s=zmail; d=siddh.me; i=code@siddh.me; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=ML2EqkeHNsgj3TjKde7zyuOTBKOcYW9uCOulr/NrERw=; b=iOPoGrRI9AkzB0ea2/BWWElK0YYqhqfQfx3CV83lDrqlCu2P3mxYZKzMJIfE1dxQ 7TU0bSgTnFnSkwt1g6XY/D8TuH72kyp9jzLPcPJh4eK8tMsrtto8AipTxfKWsiXCscD fv/P1TC/LHa/AVx6BxEogrKryFm8L8Aotdje8gsk= Received: from localhost.localdomain (103.250.137.206 [103.250.137.206]) by mx.zoho.in with SMTPS id 16596198680111014.2940277369726; Thu, 4 Aug 2022 19:01:08 +0530 (IST) From: Siddh Raman Pant To: Eric Biggers , Jonathan Corbet , David Howells , Randy Dunlap , Mauro Carvalho Chehab , Christophe JAILLET , Eric Dumazet Cc: linux-kernel , linux-kernel-mentees Message-ID: <6bac2d4c2b50d921eb16fa5344ffe258be90c651.1659618705.git.code@siddh.me> Subject: [PATCH 2/3] kernel/watch_queue: Improve struct annotation formatting Date: Thu, 4 Aug 2022 19:00:23 +0530 X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset=utf8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_RED 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 Improve formatting struct annotations in watch_queue.h, so that they fall in the preferred 80 character limit. Signed-off-by: Siddh Raman Pant --- include/linux/watch_queue.h | 96 +++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 25 deletions(-) diff --git a/include/linux/watch_queue.h b/include/linux/watch_queue.h index fc6bba20273b..c99c39ec6548 100644 --- a/include/linux/watch_queue.h +++ b/include/linux/watch_queue.h @@ -18,57 +18,103 @@ =20 struct cred; =20 +/** + * watch_type_filter - Filter on watch type + * + * @type: Type of watch_notification + * @subtype_filter: Bitmask of subtypes to filter on + * @info_filter: Filter on watch_notification::info + * @info_mask: Mask of relevant bits in info_filter + */ struct watch_type_filter { =09enum watch_notification_type type; -=09__u32=09=09subtype_filter[1];=09/* Bitmask of subtypes to filter on */ -=09__u32=09=09info_filter;=09=09/* Filter on watch_notification::info */ -=09__u32=09=09info_mask;=09=09/* Mask of relevant bits in info_filter */ +=09__u32=09=09subtype_filter[1]; +=09__u32=09=09info_filter; +=09__u32=09=09info_mask; }; =20 +/** + * watch_filter - Filter on watch + * + * @rcu: (union) RCU head + * @type_filter: (union) Bitmask of accepted types + * @nr_filters: Number of filters + * @filters: Array of watch_type_filter + */ struct watch_filter { =09union { =09=09struct rcu_head=09rcu; -=09=09/* Bitmask of accepted types */ =09=09DECLARE_BITMAP(type_filter, WATCH_TYPE__NR); =09}; -=09u32=09=09=09nr_filters;=09/* Number of filters */ +=09u32=09=09=09 nr_filters; =09struct watch_type_filter filters[]; }; =20 +/** + * watch_queue - General notification queue + * + * @rcu: RCU head + * @filter: Filter on watch_notification::info + * @pipe: The pipe we're using as a buffer. + * @watches: Contributory watches + * @notes: Preallocated notifications + * @notes_bitmap: Allocation bitmap for notes + * @usage: Object usage count + * @lock: Spinlock + * @nr_notes: Number of notes + * @nr_pages: Number of pages in notes[] + * @defunct: True when queues closed + */ struct watch_queue { =09struct rcu_head=09=09rcu; =09struct watch_filter __rcu *filter; -=09struct pipe_inode_info=09*pipe;=09=09/* The pipe we're using as a buffe= r */ -=09struct hlist_head=09watches;=09/* Contributory watches */ -=09struct page=09=09**notes;=09/* Preallocated notifications */ -=09unsigned long=09=09*notes_bitmap;=09/* Allocation bitmap for notes */ -=09struct kref=09=09usage;=09=09/* Object usage count */ +=09struct pipe_inode_info=09*pipe; +=09struct hlist_head=09watches; +=09struct page=09=09**notes; +=09unsigned long=09=09*notes_bitmap; +=09struct kref=09=09usage; =09spinlock_t=09=09lock; -=09unsigned int=09=09nr_notes;=09/* Number of notes */ -=09unsigned int=09=09nr_pages;=09/* Number of pages in notes[] */ -=09bool=09=09=09defunct;=09/* T when queues closed */ +=09unsigned int=09=09nr_notes; +=09unsigned int=09=09nr_pages; +=09bool=09=09=09defunct; }; =20 -/* - * Representation of a watch on an object. +/** + * watch - Representation of a watch on an object. + * + * @rcu: (union) RCU head + * @info_id: (union) ID to be OR'd in to info field + * @queue: Queue to post events to + * @queue_node: Link in queue->watches + * @watch_list: Link in watch_list->watchers + * @list_node: The list node + * @cred: Creds of the owner of the watch + * @private: Private data for the watched object + * @id: Internal identifier + * @usage: Object usage count */ struct watch { =09union { =09=09struct rcu_head=09rcu; -=09=09u32=09=09info_id;=09/* ID to be OR'd in to info field */ +=09=09u32=09=09info_id; =09}; -=09struct watch_queue __rcu *queue;=09/* Queue to post events to */ -=09struct hlist_node=09queue_node;=09/* Link in queue->watches */ +=09struct watch_queue __rcu *queue; +=09struct hlist_node=09queue_node; =09struct watch_list __rcu=09*watch_list; -=09struct hlist_node=09list_node;=09/* Link in watch_list->watchers */ -=09const struct cred=09*cred;=09=09/* Creds of the owner of the watch */ -=09void=09=09=09*private;=09/* Private data for the watched object */ -=09u64=09=09=09id;=09=09/* Internal identifier */ -=09struct kref=09=09usage;=09=09/* Object usage count */ +=09struct hlist_node=09list_node; +=09const struct cred=09*cred; +=09void=09=09=09*private; +=09u64=09=09=09id; +=09struct kref=09=09usage; }; =20 -/* - * List of watches on an object. +/** + * watch_list - List of watches on an object. + * + * @rcu: RCU head + * @watchers: List head + * @release_watch: Function to release watch + * @lock: Spinlock */ struct watch_list { =09struct rcu_head=09=09rcu; --=20 2.35.1