Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2735291pxj; Sat, 19 Jun 2021 23:02:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOEs3jwY+aqnS5+MMO5CagYSWqhYni0qNwYx9i3nZg9shBP267Iz6gF6RY3F0qT4bok1Sg X-Received: by 2002:a6b:f618:: with SMTP id n24mr14976219ioh.174.1624168929463; Sat, 19 Jun 2021 23:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624168929; cv=none; d=google.com; s=arc-20160816; b=ojOolOnFbDzm6KiNl4Zx4V15IR1yG6qUoE2T2GGILupV2AvPlRYE7GHJ3rmkBkFWkP LRoswfGnqc7VeT0fb9rykbpVsVrOlLKni7lHEonBlq/VHdPNa7Nl9Dzk3KdMx4wu0V2H VYrQWKd0cnicC63/Em0mTFMjxp1lVS0WuEKo9x9MBr8TlXxzW7bkxdo6v5aOYC7cKa9V WF/QJ0S5ADv2uF4aOHrjxjiF0OW6r22LRB+14oewNf5uIZo6HgFBwVV8pWMGuMjjtseE XQtZ6sm3rvuwynICV7qjofuyeAccbkMCq+mOX0GfHr6jAZrhD4/lq5aV0gTXqCXLWYfD ZQIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=n+tKlkajW6Vx9drB71r32BwcKUgAEh+DEGbzs80J8ds=; b=RcM0XBDFE2DCtMn0jC2iJARChdB1cnf6Hb6MuYWAK2U0ZoSt8vqhnRL5i+72OGrs9I 09jwCypRlRaXGa1n+gvpld1n8bEk2ITn76puNKqLnCo8kANvQLmFJfhYqRIA6PuifIz0 NcyeidMQvOP0KNI8moipwUtkdkFuLzfXY0vQ4IDiWgW04sWKB+qXR8+GN9qWqFuieY+f 2Kk97TDMT9ehOg4fvy+A9JHOpfTyxZ7cGC6b5aJc74dAw5g9ZQLDJGVnOdFe1czWAbY6 WyUMwb91NqR8+V1DTb5Q9Z6sL9HrAsEwrl5yJXcyZ+e5Ew8j//h+SI5ygNkHDVcazD7p +4qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=pkXnugDU; 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 y4si5774522jas.26.2021.06.19.23.01.35; Sat, 19 Jun 2021 23:02:09 -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=pkXnugDU; 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 S229469AbhFTFyv (ORCPT + 99 others); Sun, 20 Jun 2021 01:54:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbhFTFyu (ORCPT ); Sun, 20 Jun 2021 01:54:50 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFEF1C061756 for ; Sat, 19 Jun 2021 22:52:36 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id x14so20179483ljp.7 for ; Sat, 19 Jun 2021 22:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=n+tKlkajW6Vx9drB71r32BwcKUgAEh+DEGbzs80J8ds=; b=pkXnugDU5F1cob7L8JUgEowRz8H7YsDeNwBDBNbW/VVH9XWyc7B0kg+JGpxRBrW2uE 6Yf8F7Fo6+xUeNlD8SyU5V8DmC3hGvTSxWHy1JKgtOlsdE8fcTCGl3X/FaL2VuGnTeg5 yxYHgzpixsRtt6FUiqUbMcNMbarPSMXbSvQNiqR6Ueup1JwUylKXYvgxItN2RPthcBgN HHWGMCsFT5dliGztfuHMu7vsHDqC4UGJId2qlu2huSdF0vGgjVDwWdqDobjnhZ5onKAQ CrpncmAsrTNf0Dm9HGEVxeVLBUhkC12OeXZPLd1fDTt8uoTztkcjd9ApFTsdnnawe95L y6Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=n+tKlkajW6Vx9drB71r32BwcKUgAEh+DEGbzs80J8ds=; b=MIb5wUCUGPdh1QcoEtj6lu55Xd6FEqxzSjxwoXvGLb8YG4xHGhkznv9CMjLjvC2PGA iW1b5Y+YmBeU6VUizKBcbAKyWiMmhiWy0UZ8f+u2z+fNPLm+fQFoYSfIYoIIYZnx+RCd DWREzEAwk4HLhNpqa/zx2Ys6fZIm5ooVhpthR9bvArY9Dy/Th5Ms+bk2VDYhHnlar01N fsATy3huPNx42X/AuUGZ2F2ru2G8NOkEWI6J4DEF132xMQv0KDIr/IB8Spht+nRSrWnM fEMAFj6+jKI9hk/q9g1XXcimzD7FIaNvtodecYGcfO5FWVAb7VPRV3y+PJs2e48B3aiE fngg== X-Gm-Message-State: AOAM531/mTZuv7bHHBA6FnVyRjPVbPE6sK4gUOqQZ2YWk7EVB6+6+2Wr xIJoJSOUc0rAWZMBjMqjwAgRptysyM0VALOdW++QEA== X-Received: by 2002:a2e:8503:: with SMTP id j3mr16240319lji.322.1624168348979; Sat, 19 Jun 2021 22:52:28 -0700 (PDT) MIME-Version: 1.0 References: <20210617071027.60278-1-hexin.op@bytedance.com> <87wnqpdco2.ffs@nanos.tec.linutronix.de> In-Reply-To: <87wnqpdco2.ffs@nanos.tec.linutronix.de> From: =?UTF-8?B?5L2V6ZGr?= Date: Sun, 20 Jun 2021 13:52:18 +0800 Message-ID: Subject: Re: [External] Re: [PATCH] debugobjects: add missing empty function debug_object_active_state() To: Thomas Gleixner Cc: Stephen Boyd , Kees Cook , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thomas Gleixner =E4=BA=8E2021=E5=B9=B46=E6=9C=8820=E6= =97=A5=E5=91=A8=E6=97=A5 =E4=B8=8A=E5=8D=8812:47=E5=86=99=E9=81=93=EF=BC=9A > > On Fri, Jun 18 2021 at 22:03, Stephen Boyd wrote: > > Quoting Xin He (2021-06-17 00:10:27) > >> All other functions are defined for when CONFIG_DEBUG_OBJECTS > >> is not set. > >> > >> Signed-off-by: Xin He > >> --- > >> include/linux/debugobjects.h | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/include/linux/debugobjects.h b/include/linux/debugobjects= .h > >> index 8d2dde23e9fb..af0d73d8d29b 100644 > >> --- a/include/linux/debugobjects.h > >> +++ b/include/linux/debugobjects.h > >> @@ -99,6 +99,9 @@ static inline void > >> debug_object_free (void *addr, const struct debug_obj_descr *des= cr) { } > >> static inline void > >> debug_object_assert_init(void *addr, const struct debug_obj_descr *de= scr) { } > >> +static inline void > >> +debug_object_active_state(void *addr, const struct debug_obj_descr *d= escr, > >> + unsigned int expect, unsigned int next) { } > > > > I suppose it's a landmine that may go off at some point, but this isn't > > fixing anything that's broken at the moment, correct? > > The two users (RCU/i915) have it guarded with RCU/I915 specific config > options which depend on CONFIG_DEBUG_OBJECTS. > > I have no problem with the patch per se, but it want's a proper use case. > > Thanks, > > tglx > > > Yes, config options ensure that there will be no problems. But when CONFIG_DEBUG_OBJECTS is not set, we should provide all empty functions that may be used. Thanks.