[{"id":1774351,"web_url":"http://patchwork.ozlabs.org/comment/1774351/","msgid":"<CAPnjgZ0y3mQr1327Pu0JUSYZJAL30q73R7Vg9uryGxSjrTxyWg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-25T02:15:35","subject":"Re: [U-Boot] [PATCH v2 8/8] dm: define dev_*() log functions in DM\n\theader","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"On 15 September 2017 at 23:10, Masahiro Yamada\n<yamada.masahiro@socionext.com> wrote:\n> Many drivers use dev_err, dev_info, etc. for logging.  Currently,\n> we are relying on <linux/compat.h>, but I guess the best home is\n> <dm/device.h>, taking into account that Linux defines them in\n> <linux/device.h>.\n>\n> For now, I am keeping the ones in <linux/compat.h> because lots of\n> Linux-originated code uses dev_*() just for the purpose of syncing,\n> but the first argument is not struct udevice, so we need to ignore\n> it.  Once this issue is ironed out, it would be possible to prefix\n> log messages with a device name that emitted it, like Linux.\n>\n> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n> ---\n>\n> Changes in v2:\n>   - newly added\n>\n>  include/dm/device.h    | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++\n>  include/linux/compat.h | 17 ++++++++++++\n>  2 files changed, 89 insertions(+)\n\nReviewed-by: Simon Glass <sjg@chromium.org>\n\nBut shouldn't it be emerg rather than emerge?\n\n- Simon","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"PGXpWqH7\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"TYTt+eKV\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0nx23xfSz9sRq\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 12:25:10 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 2B690C2217F; Mon, 25 Sep 2017 02:22:04 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 4A93CC2218A;\n\tMon, 25 Sep 2017 02:22:02 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid E05BAC221AD; Mon, 25 Sep 2017 02:16:01 +0000 (UTC)","from mail-qt0-f181.google.com (mail-qt0-f181.google.com\n\t[209.85.216.181])\n\tby lists.denx.de (Postfix) with ESMTPS id 4473AC22114\n\tfor <u-boot@lists.denx.de>; Mon, 25 Sep 2017 02:15:57 +0000 (UTC)","by mail-qt0-f181.google.com with SMTP id o52so5536938qtc.9\n\tfor <u-boot@lists.denx.de>; Sun, 24 Sep 2017 19:15:57 -0700 (PDT)","by 10.200.37.200 with HTTP; Sun, 24 Sep 2017 19:15:35 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,\n\tRCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=1rkpkH9Hrisp+aKmBo2MJ48w+1mEFMl+NGPJhnrj5a8=;\n\tb=PGXpWqH74BNpBQaJUbiaX5eAZFhukd9hZM5jffWTRiwEexwiQF6CSyNuMryyUl1mVq\n\tc6AZRgllgESo72o1WxLtI2e6BE8Ocb5i2R6az5K3bLxbkPqEOKDGnV5l/OA0TKmv0Jqz\n\tdVEcXCLKC+HFEY+oNtO+61o9J3ULMUOZ8xrhY9cpGkevQ5TdpDye0tH1XmV/DKZ1rfzM\n\tBzaGkzZkFHJn76n2iltMFyyGaOFe2/qZyuRA3EpI+XIZsY3clDL8n+a+e1pgLrEivqsC\n\ti3gfInOSTKmupVPwsXWa34G+s8Iqi6vdxaeqLjEvKzlBBr6nrX/fXBb2Q9VaRYDUXhp6\n\tbMMg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=1rkpkH9Hrisp+aKmBo2MJ48w+1mEFMl+NGPJhnrj5a8=;\n\tb=TYTt+eKVqBvwDCQC6yqQWkZong5EitXgQgEjjEUKvc/DxKJOZwnpGZXsz/hpT2i3/+\n\tzByDiGxLHdqn7Qd8N5Z7ZlbI0MKzH0jfIOwLTKD6nXlZ/EjN2Qsu5iq7KC44ipebKld/\n\taLjmdShSSA3fuW/2wZECm6udXuDOKYAfAmKOk="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=1rkpkH9Hrisp+aKmBo2MJ48w+1mEFMl+NGPJhnrj5a8=;\n\tb=bPtJY2H2gDN3CnalPatKngy8rUeNloS/1deP+A2w3dgqQqJLQrCAeqjSnGUDdvSzg0\n\tcqCeg/redd/FMtH2ecPd9HbZmx2y6e6Kx9cb02nStOfIZ4fnsEshtaw0ZK86KF2l5Bnk\n\t5ovJTTEW6Pq9FOvx67WsWI/59sjmaCjj+qyG+mir02koREOPb9923oyZK1tXR5jTiRgT\n\tyrWfAFsWokYwVxmdCRaE2qJeHMClE+yD9Tq3kitH7IYw2xc7MO+5xdxMrxwwVALS5kMY\n\tx3YWS4VbVZcTr/Fe5ZEkAXN25K2sPaoBYWSnzUbOi0oUJT9bkXk+poEwhJKJPpL6I4hf\n\t20Vw==","X-Gm-Message-State":"AHPjjUh8t21IZus8U5CHJz3QGrk60Ht8jnBXQXPaoCbPScFdAp8Tdv9X\n\tEoOSttHd3x+ywvkjwa//Ozcz3NRdHRD9W3G4UjU7vA==","X-Google-Smtp-Source":"AOwi7QAqjVNrOjOWoZr//PsCIpbYaEcduRNOWVTXH2muLTTXq/ywd6niA5IJPNMviiIohn9tARsy9s23XFsvIOC+mWg=","X-Received":"by 10.237.37.182 with SMTP id x51mr8847009qtc.5.1506305756066;\n\tSun, 24 Sep 2017 19:15:56 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<1505538646-19191-9-git-send-email-yamada.masahiro@socionext.com>","References":"<1505538646-19191-1-git-send-email-yamada.masahiro@socionext.com>\n\t<1505538646-19191-9-git-send-email-yamada.masahiro@socionext.com>","From":"Simon Glass <sjg@chromium.org>","Date":"Sun, 24 Sep 2017 22:15:35 -0400","X-Google-Sender-Auth":"1meydscxFuhdX0lZ_ScKtipJV-M","Message-ID":"<CAPnjgZ0y3mQr1327Pu0JUSYZJAL30q73R7Vg9uryGxSjrTxyWg@mail.gmail.com>","To":"Masahiro Yamada <yamada.masahiro@socionext.com>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH v2 8/8] dm: define dev_*() log functions in DM\n\theader","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1775104,"web_url":"http://patchwork.ozlabs.org/comment/1775104/","msgid":"<CAK7LNAT0yv3UjOKFAyTSdX52tRN8+4agyZTM9L7N66A6GLnSUQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-26T03:00:28","subject":"Re: [U-Boot] [PATCH v2 8/8] dm: define dev_*() log functions in DM\n\theader","submitter":{"id":65882,"url":"http://patchwork.ozlabs.org/api/people/65882/","name":"Masahiro Yamada","email":"yamada.masahiro@socionext.com"},"content":"Hi Simon,\n\n\n2017-09-25 11:15 GMT+09:00 Simon Glass <sjg@chromium.org>:\n> On 15 September 2017 at 23:10, Masahiro Yamada\n> <yamada.masahiro@socionext.com> wrote:\n>> Many drivers use dev_err, dev_info, etc. for logging.  Currently,\n>> we are relying on <linux/compat.h>, but I guess the best home is\n>> <dm/device.h>, taking into account that Linux defines them in\n>> <linux/device.h>.\n>>\n>> For now, I am keeping the ones in <linux/compat.h> because lots of\n>> Linux-originated code uses dev_*() just for the purpose of syncing,\n>> but the first argument is not struct udevice, so we need to ignore\n>> it.  Once this issue is ironed out, it would be possible to prefix\n>> log messages with a device name that emitted it, like Linux.\n>>\n>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n>> ---\n>>\n>> Changes in v2:\n>>   - newly added\n>>\n>>  include/dm/device.h    | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++\n>>  include/linux/compat.h | 17 ++++++++++++\n>>  2 files changed, 89 insertions(+)\n>\n> Reviewed-by: Simon Glass <sjg@chromium.org>\n>\n> But shouldn't it be emerg rather than emerge?\n>\n\nGood catch!\n\nI just moved the macros from include/linux/compat.h\nbut it should be dev_emerg()\n\nCurrently, there is no user of this macro,\nso it is better to rename it.","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=nifty.com header.i=@nifty.com\n\theader.b=\"ICN7Aait\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1Qhh70jwz9t3F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 13:01:40 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid BB4FDC21E06; Tue, 26 Sep 2017 03:01:35 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 2384EC21CA5;\n\tTue, 26 Sep 2017 03:01:33 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid C31EEC21CA5; Tue, 26 Sep 2017 03:01:31 +0000 (UTC)","from conssluserg-01.nifty.com (conssluserg-01.nifty.com\n\t[210.131.2.80]) by lists.denx.de (Postfix) with ESMTPS id ED0B3C21C71\n\tfor <u-boot@lists.denx.de>; Tue, 26 Sep 2017 03:01:29 +0000 (UTC)","from mail-yw0-f169.google.com (mail-yw0-f169.google.com\n\t[209.85.161.169]) (authenticated)\n\tby conssluserg-01.nifty.com with ESMTP id v8Q319eK031431\n\tfor <u-boot@lists.denx.de>; Tue, 26 Sep 2017 12:01:10 +0900","by mail-yw0-f169.google.com with SMTP id w22so6148811ywa.13\n\tfor <u-boot@lists.denx.de>; Mon, 25 Sep 2017 20:01:09 -0700 (PDT)","by 10.37.170.198 with HTTP; Mon, 25 Sep 2017 20:00:28 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=T_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Filter":"OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com v8Q319eK031431","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1506394870;\n\tbh=57WckiwCJgfM3TFl9bxlOhar55/mYBLARBBghMhYkBI=;\n\th=In-Reply-To:References:From:Date:Subject:To:Cc:From;\n\tb=ICN7Aait3dGrFyZVHz/sZkZ3UpBXaFvZAw6s+85Apj7D1qO6dmmduNjOkkpVEW70E\n\t/82L77xSbwB1rIhO82RkSAWLpcGQLHvPMdGQ/BM2Vm+hleMTJRnjziuh1FsJneHhsm\n\tU/e9L8W44xCtu/2nH9+hX5uLLXjXqAKEWFeotwPrp3B/vk6v4yU6A+0OsLCqelj5tK\n\tQdjnZSO++LZDBv42TO0S1W7Od+MaOf8JCoo9RIOvNX5B+qugPWHD0QAErHIQJGKNHP\n\twbQx8M8K61B9ve1gla2/sEg+a3vXfpJEHKzq91uWBxQ3msqgaW2vRrpsyPlr0Ef2qQ\n\tS2bL0IN/t/Nbw==","X-Nifty-SrcIP":"[209.85.161.169]","X-Gm-Message-State":"AHPjjUjwLh/ezIE3VGzlzo+HmBRf4zbnwKHSYjO8aA/0eDFdDheSerdH\n\t6Tp9oRKC6tRntFNK6CkFz5o+Oz2lPqmzGg4QtOs=","X-Google-Smtp-Source":"AOwi7QBRhsDhV0uMJSuFEpX5OTraqdJ3uht3rOMMXAAjdk8WiyevAFnI9AhmKgtnqYCjcSBhauDea7gx9vdHXY0qH1I=","X-Received":"by 10.37.4.210 with SMTP id 201mr6005028ybe.42.1506394868929;\n\tMon, 25 Sep 2017 20:01:08 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CAPnjgZ0y3mQr1327Pu0JUSYZJAL30q73R7Vg9uryGxSjrTxyWg@mail.gmail.com>","References":"<1505538646-19191-1-git-send-email-yamada.masahiro@socionext.com>\n\t<1505538646-19191-9-git-send-email-yamada.masahiro@socionext.com>\n\t<CAPnjgZ0y3mQr1327Pu0JUSYZJAL30q73R7Vg9uryGxSjrTxyWg@mail.gmail.com>","From":"Masahiro Yamada <yamada.masahiro@socionext.com>","Date":"Tue, 26 Sep 2017 12:00:28 +0900","X-Gmail-Original-Message-ID":"<CAK7LNAT0yv3UjOKFAyTSdX52tRN8+4agyZTM9L7N66A6GLnSUQ@mail.gmail.com>","Message-ID":"<CAK7LNAT0yv3UjOKFAyTSdX52tRN8+4agyZTM9L7N66A6GLnSUQ@mail.gmail.com>","To":"Simon Glass <sjg@chromium.org>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH v2 8/8] dm: define dev_*() log functions in DM\n\theader","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]