Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27372296rwd; Tue, 4 Jul 2023 01:55:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHDOkKX5Hiyu5C64YrGRVRCxHmhcs8uOAGRmvsd7jN6WWL3Gl4BfCrc3y1i0H3iSbWkoRSk X-Received: by 2002:a05:6358:1a95:b0:134:d281:2cb1 with SMTP id gm21-20020a0563581a9500b00134d2812cb1mr6469897rwb.32.1688460944867; Tue, 04 Jul 2023 01:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688460944; cv=none; d=google.com; s=arc-20160816; b=zMWbVB5DNSt6vWLrU8yOQlNE+9a8GA79Gcm6+abflg4JX+HRs/VRGB+rLvHvBDAqKv 11Q01PBeqW5MJSB/jRdIMqdghyEiCzLLSqNFhec5NZ7zCJ5yLJO+uc2RO4bVLIIMpBzQ kE/D7GLw/PBsS0QJrjBVXzZgWzH6vWoSHxMvxG19pZiy7uXU4II9Z1+AAxCcGIkiAuzK Z1+SDgAGKT7X6hfrpcOWVBcekf+nvt59GZB1kgaLUCxDef7IxlHon7Xi8Xtr9FBXWxc5 HCZ4cuR4x3avYK4EYlraNPS8nU8KFYlJWxTMwBJnJMDM5SkZ5CmscGn24kUQmZ6YFC6b pPKg== 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:references:organization:in-reply-to:subject:cc:to :from:dkim-signature; bh=e8gLwcZzeO72npmU6MumfcPKN+ua5xNlilXyaSjNRac=; fh=Tt1s6VHNIMRxIBtER8TIG4d5kjKLVbMG9vVoS1MoWKc=; b=l/Tui/Cm9uto5zTy2f1GGCeiPXPJ3+6u4UGctotWJnS5FPelU/R3yaVOvq5iNHHi6o sCHCflMMNjORxLaS25TtX73CS8UElm1VF02g0hannYMad32q4T6MYmERqJ7ggE4YR3jr DWS8GH07Se5IV7YOQAa0TTKISAk0Ku61N9kib3aHeiIdqMBahc2C1pqbsRq8fsCAf90+ 43bOia7dNCzpW0EA/6zSBaOsLJXCUTcgSAJArOuPRXHqVBbSeymkYyhwgskOpDK5a/wm fHGg/WTp1JwEnt+oR1xT/UV8XRT39GQDcHWGivz7Nf0spJ06qdmL3sDoTMQuML06lgTX ieHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RQ+I29ri; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d21-20020a631d55000000b0055752f5a11csi19705985pgm.390.2023.07.04.01.55.32; Tue, 04 Jul 2023 01:55:44 -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=RQ+I29ri; 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 S231445AbjGDIia (ORCPT + 99 others); Tue, 4 Jul 2023 04:38:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231288AbjGDIhy (ORCPT ); Tue, 4 Jul 2023 04:37:54 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6600210DF for ; Tue, 4 Jul 2023 01:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688459830; x=1719995830; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=e8gLwcZzeO72npmU6MumfcPKN+ua5xNlilXyaSjNRac=; b=RQ+I29riZZ54dBB9JJe8UiByKGI20RT5ao3y3WGeEU1b+J/SLbl/MMVD YFP/ZZL4i8agmfix0oHSLQ3hHB8KmMYlDPyCZjtFIiJPKoJrZclNHF55z 9cS9LX0/yJ+dBF5kT1SVx1L2HFDVQHh2ugMPovm8xfSEjojYes2WCQpSR GYZTIy7FlP9VwBPcFrcrFI4KlgUr9rl/OnJkgIbyIJ53Zj8wYPi0UGZhY yvRWw59zpXTkqvhPLqWLAEYKjueMc84gtiv6dm+WI9DKoj1GjBp/PGOYu jgBxUAzN8k5d3gtd5OVF6P/HPGIingbV6kOTQQaEek/POH77TqtJkKp80 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="343406513" X-IronPort-AV: E=Sophos;i="6.01,180,1684825200"; d="scan'208";a="343406513" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2023 01:37:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="669014207" X-IronPort-AV: E=Sophos;i="6.01,180,1684825200"; d="scan'208";a="669014207" Received: from jbouhlil-mobl.ger.corp.intel.com (HELO localhost) ([10.252.48.173]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2023 01:37:06 -0700 From: Jani Nikula To: Uros Bizjak Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Subject: Re: [PATCH] drm/i915/pmu: Use local64_try_cmpxchg in i915_pmu_event_read In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20230703150859.6176-1-ubizjak@gmail.com> <87o7ks16gh.fsf@intel.com> Date: Tue, 04 Jul 2023 11:37:04 +0300 Message-ID: <87lefw139r.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,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 On Tue, 04 Jul 2023, Uros Bizjak wrote: > On Tue, Jul 4, 2023 at 9:28=E2=80=AFAM Jani Nikula wrote: >> You could save everyone a lot of time by actually documenting what these >> functions do. Assume you don't know what local64_try_cmpxchg() does, and >> see how many calls you have to go through to figure it out. > > These functions are documented in Documentation/atomic_t.txt (under > "RMW ops:" section), and the difference is explained in a separate > section "CMPXCHG vs TRY_CMPXCGS" in the same file. Thanks, but *sigh*. No kernel-doc above the functions, not even a regular comment referencing atomic_t.txt. $ git grep local.*_try -- Documentation [nothing] BR, Jani. --=20 "But the plans were on display..." "On display? I eventually had to go down to the cellar to find them." "That's the display department." "With a flashlight." "Ah, well, the lights had probably gone." "So had the stairs." "But look, you found the notice, didn't you?" "Yes," said Arthur, "yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying 'Beware of the Leopard'." - Douglas Adams, The Hitchhiker's Guide to the Galaxy=20 --=20 Jani Nikula, Intel Open Source Graphics Center