From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD4E0C433EF for ; Tue, 19 Apr 2022 08:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350024AbiDSIdU (ORCPT ); Tue, 19 Apr 2022 04:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343528AbiDSIdS (ORCPT ); Tue, 19 Apr 2022 04:33:18 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C043611C19; Tue, 19 Apr 2022 01:30:36 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id u15so31300570ejf.11; Tue, 19 Apr 2022 01:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4OiFs7ulzkmKAramSw5U/UagtmvyMZLn6GtNwoWbozk=; b=QthceWOYPQDs1AOg0WckUxHDyE14D6jg6NVqJeea2fBLKkqyrVqIKoYdtOKtjDyjtp lLTTsYiQgFJpnVVjtsj+rjKiEXZ296YfiEGnqNC31aKreLmnHNOcOHAbwiZXmCJu+lri Y6U2ZOB48vPGFFhbjSOtOMJjuX1A5qHTCWxc8irzIRCzvlWHKAa3Yym3f5IxMesK1vSl J8Cek9lXtPzhmCV8SjODmgVwPYvSphXMUCfIXBibnzgo4jP6QIJhcPAlJv5KulLU+wVj 6hzpRMGeBqKgat8hF5YkEKo0MiXwBucxR8wDXWRGiEZADmknKRicABFkfcEwyrdssL9y 9IMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4OiFs7ulzkmKAramSw5U/UagtmvyMZLn6GtNwoWbozk=; b=VJYKokzEmQM2PY4GgLNF3hlIDGoB5OZEk19RS8rrjpHy3LAdVRgErT2JG1Rum/0kZj EWX2W4OhOWkxy+10DK4VS0SAD3Gpkt8jMco73mMfhYdIX+A4OYKKcs5jGJwp/q/kurVX U7+YpnK7MgBQpQXyIiHLh6UG2iabRCayGPtr/iVmOQ6QZ3KU8AGmriGIQvHW3gCxG8mr AeaQFJtcB80yiZy2/uZh+day35NmjK3iDWDm7qWX/6j82rfM2NpF3/8zr78DbmSl31dM Un0lBhmcBnP+gGf2wde/kWHwfKWBfPkxHlSZEVXQOXuVgzU0rGMc0NiOr5AaMTk05VXB WVCA== X-Gm-Message-State: AOAM530zxnE0uzkircGW5drcCc2bVQhjc375o2ss2XLqjWi4h2U8b7/b WNXpZYXDYv7Lwuvv2EQ4iBE8V5qAxXyDEM36rzM= X-Google-Smtp-Source: ABdhPJwuFgKeG5m9W8LUoWssPxFYUalbeGcev7sYoZsXiC2tgMwSWkKX6pCKIsldjIeRBrc2nK/Hpu2DY7UfXHOvZq4= X-Received: by 2002:a17:906:1cd1:b0:6ec:c59:6a1d with SMTP id i17-20020a1709061cd100b006ec0c596a1dmr11671524ejh.77.1650357035349; Tue, 19 Apr 2022 01:30:35 -0700 (PDT) MIME-Version: 1.0 References: <20220415130005.85879-1-andrea.merello@gmail.com> <20220415130005.85879-13-andrea.merello@gmail.com> <20220415174808.3b81baa4@jic23-huawei> In-Reply-To: From: Andy Shevchenko Date: Tue, 19 Apr 2022 11:29:59 +0300 Message-ID: Subject: Re: [v4 12/14] iio: imu: add BNO055 serdev driver To: Andrea Merello Cc: Jonathan Cameron , Mauro Carvalho Chehab , linux-iio , Linux Kernel Mailing List , devicetree , Lars-Peter Clausen , Rob Herring , Matt Ranostay , Alexandru Ardelean , jmondi , Andrea Merello Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 19, 2022 at 10:48 AM Andrea Merello wrote: > Il giorno sab 16 apr 2022 alle ore 10:45 Andy Shevchenko > ha scritto: > > On Fri, Apr 15, 2022 at 7:40 PM Jonathan Cameron wrote: > > > On Fri, 15 Apr 2022 15:00:03 +0200 > > > Andrea Merello wrote: ... > > > > +CFLAGS_bno055_ser.o := -I$(src) > > > > > > Via a bit of grepping I can see other instances of this pattern which point out > > > that it's to do with allowing the tracing framework to see trace.h. > > > Perhaps a similar comment here would be good (if nothing else I doubt I'll > > > remember why this magic is here in a few years time!) > > > > Can be done better way, see dwc3 or drivers/base/ trace point implementations. > > May you elaborate, please? It appears that both dwc3 and driver/base > use this same trick of tweaking the CFLAGS in the Makefile in order to > fix the header file thing. What I see is different is that they both > use an (almost empty) trace.c file. Is this what you are suggesting? There are two differences in your code: 1) no separate c module, which... 2) is built depending on CONFIG_TRACE. Hence, no need to have a separate ugly config option. -- With Best Regards, Andy Shevchenko