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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32EABC4338F for ; Thu, 19 Aug 2021 11:11:10 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39C49610FE for ; Thu, 19 Aug 2021 11:11:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 39C49610FE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4A94882E67; Thu, 19 Aug 2021 13:11:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1629371467; bh=Gi/yec1GSrCW2Mpaz3y1BbqFXj7cYRwfABOdNy+hgZE=; h=To:cc:From:Subject:In-reply-to:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VipmabufATr2cL4EEWm+q8DDhc7XUu32XRazjtZjhUAIvnSmXoP45vLiEJCQhcsj6 LZ7C2npqc5HvB9w36ex8bP27yreeXDV+z+XOUjQTk2l+JeyUX9zlz+zoh75GQ7EZsJ p4Ds2xvOnq1hP4lhnEzHvvVKSEwSABbkNWq3puKvo3c6ejz3XtWfeeNBey1JYfv0AE F6LN0jAlWKnaQiRwYjYYsgYRKkO0al+3HibcVcFG+RtQHLIqPkSSb7O4siePuMwIDE e5nkT5OtnIr5mSiSvNKAoZ0Ut7FQaUTlqyDCuw0rbfLQXr9RA524wY5D+CClyIi0+Z VN/A/YPCyRGUA== Received: from janitor.denx.de (unknown [62.91.23.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: noc@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id AED7282DF6 for ; Thu, 19 Aug 2021 13:11:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1629371465; bh=Gi/yec1GSrCW2Mpaz3y1BbqFXj7cYRwfABOdNy+hgZE=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=aLH3MUlLNQ6b8PnH23/ez52L0ahv0VUlNScY+IgWG+xqOSNQ23fqBUulQn/wbDTuA EOkrrRGrDWpDJ9nBt7CwuDWYkXqgtYQAv/q6cKSX7YdvH9AkIhIK9kY2lOo3VcIZ9+ MX5BwbwDdP+U3DCX0QjS72S6XBVtR+MP5FRaPPRpM/D9nCMSZh6X9MJIm5bcAIX0vh 6Gn2d7LOf8KVxH1yxCDUH/fRDkzUG9IqROZLFqDqMYUwvBNRI1W0+jHMdDUNwbZ2KA Eo1XxkCgft/ZSJjRQQzn3pOw+MTLXvHhuHVJQeW4KbwRiYbkeJsi6uJP1xyLn7wF+E /kphW1lIaBNjA== Received: by janitor.denx.de (Postfix, from userid 108) id 263FCA02EA; Thu, 19 Aug 2021 13:11:05 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.4.0.2]) by janitor.denx.de (Postfix) with ESMTPS id 3CB9AA0060; Thu, 19 Aug 2021 13:10:55 +0200 (CEST) Received: from gemini.denx.de (localhost [IPv6:::1]) by gemini.denx.de (Postfix) with ESMTP id D80D61E1772; Thu, 19 Aug 2021 13:10:54 +0200 (CEST) To: Rasmus Villemoes cc: u-boot@lists.denx.de, Simon Glass , Stefan Roese , Tom Rini From: Wolfgang Denk Subject: Re: [PATCH v5 09/12] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset() MIME-Version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8bit In-reply-to: <4798abb5-07d9-fa88-931f-dbaff951e3fb@prevas.dk> References: <20210811124800.2593226-1-rasmus.villemoes@prevas.dk> <20210811124800.2593226-10-rasmus.villemoes@prevas.dk> <575933.1628751052@gemini.denx.de> <4798abb5-07d9-fa88-931f-dbaff951e3fb@prevas.dk> Comments: In-reply-to Rasmus Villemoes message dated "Fri, 13 Aug 2021 14:11:09 +0200." Date: Thu, 19 Aug 2021 13:10:54 +0200 Message-ID: <53686.1629371454@gemini.denx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Dear Rasmus, In message <4798abb5-07d9-fa88-931f-dbaff951e3fb@prevas.dk> you wrote: > >> > >> + ret = uclass_get(UCLASS_WDT, &uc); > >> + if (ret) { > >> + log_debug("Error getting UCLASS_WDT: %d\n", ret); > >> + return 0; > >> + } > > > > Here the error goes silent, so we should fix the callers to report > > it. > > The caller (singular) is the initr sequence, so returning an error is > effectively the same as halting the boot process, and as I've already > explained, I'm not going to change the semantics of initr_watchdog in > this regard. In this case you must print an error message here. > Feel free to submit a patch if you feel a change in this area is in > order. That's completely unrelated to what these patches are trying to > achieve. You add new code here, so please make sure not to add known issues. > >> + uclass_foreach_dev(dev, uc) { > >> + ret = device_probe(dev); > >> + if (ret) { > >> + log_debug("Error probing %s: %d\n", dev->name, ret); > >> + continue; > >> } > > > > Here the situation is different. The probing error is never > > reported anywhere. Is it really a normal condition that a > > device_probe() fails here? > > No, it is not a normal condition. I added the log_debug() after a > request from Simon. But log_debug() is nothing any user will see in the field. We need an error message here, too. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de If the odds are a million to one against something occuring, chances are 50-50 it will.