Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp338926ybv; Wed, 19 Feb 2020 22:51:14 -0800 (PST) X-Google-Smtp-Source: APXvYqylNuA3FCTGfa+on5VoNdz8vh0MVQibcwV6MWIv7s3PyYKsAg0AsRCIggrRCK7ALd8exaXj X-Received: by 2002:a05:6830:1e86:: with SMTP id n6mr22765526otr.321.1582181474074; Wed, 19 Feb 2020 22:51:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582181474; cv=none; d=google.com; s=arc-20160816; b=Oum4Vkd3pyc7Ea3UWC02bHClLT1r+VDfzPkQPFwVVKHshh+CGNCkByja4k+sTJGgML 6EFvNCdEa0BRRibqn/9jR4dIdaVBn3M1X42dh1INobjwU/LRy3fnTMSr8wzgHd3iKpL3 hqxcvZm/SDhFFqCRlutW3jdgWCFN9qMeGDzxsNAgqhQWnPq5lbL4ffg2BJCQlFmecW9y y3Q01y56sxVCek3AB28f0ZlvjUIvwLXqqVuJoVlxBJsqHzzWncXpbsi44wr0pqB+Dybp pQMBLGcvJ6iWqmHUivDV2DuoEtZsR96gOCjRRfE+30bFWbhfav1VaN4W5cgRRC1/iTy7 DZSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Qjx6aSF/rYbAiv0EvUOF/ZsAzxN0pfEVgpw7b59ljRE=; b=IWD+iV9IejrwwFDRchdur0bsym79c0lcyxj0zGod2+dTQzV9Ve3oY4dR9ZMQrzk4wj ZsWIou28jATE669UyYHFqKX3tHYOVBdNDWeBNlRa+id4AOt3JVex41SwN/RFQL4Yd5ez RSm1/Tfb5RXi/jiTQzTWRUTipGFYD08dzkKs6w2FLxLjgdmE/F2heif8fuWBa+ey0TuI +WRGB/cmk2ObF8VgAGXEr/J0Y2qewZXklClidnDlnWVEdpgJIq0ME4K5ACcZEYFKqIy4 o2pswasYfsEuAkk7IHtlXY83Z4Sjj609RkTQjvy3OYITpoIr3wL9mqq9QKihskIfIaTW KZGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=H62U5hBE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si1248231otd.76.2020.02.19.22.51.01; Wed, 19 Feb 2020 22:51:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=H62U5hBE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbgBTGud (ORCPT + 99 others); Thu, 20 Feb 2020 01:50:33 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:40954 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726198AbgBTGud (ORCPT ); Thu, 20 Feb 2020 01:50:33 -0500 Received: by mail-vs1-f66.google.com with SMTP id c18so2005968vsq.7 for ; Wed, 19 Feb 2020 22:50:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qjx6aSF/rYbAiv0EvUOF/ZsAzxN0pfEVgpw7b59ljRE=; b=H62U5hBEbjiE4TCDoMRdK1Jd86R01mh7rJVbO8yWo1j8QYD/F0egNJdaQLiP9Y68O5 J/NusiLUwR1RZUPv/eH48umnaBo3GiMrY2T0F2hqxf7/FPBwgnWh9uliywhNTtlQ9pFl OoDa0qXB5F1ze2QjirWfLhJsuDuYbP/eA6fYs= 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; bh=Qjx6aSF/rYbAiv0EvUOF/ZsAzxN0pfEVgpw7b59ljRE=; b=Bbdn0sSAdduzQQlDeKVzo1bo27rifUI8dlDxMbx5JRd21l0KKk/bHVtIMfjoOpGps2 l1in3ic2ligdoSHvDJGyXdAGTXIUPG2s1F/4/F5eNbqz73ja9l+tF1YjEWaKYc/8TPRH LjSZ1AQA6UjQxC9E1oQv3ZPh4BEYKGnO1wgKb+YJ23sx692y4TDJmWy+ghhALnOCffof xLsG+uz2V5xKtoN0jwh51ppG7HyxH4moe6GEc+zZj4Pz0Q+fcItxy3xV9qwDenAWMG0j G5PgC7dKmNq1Zw8P8rUtA/CKw2OW8xNOWb7Y+qMbstyS3PippJB6xsz2j2llO/hqFmgE KH3g== X-Gm-Message-State: APjAAAUrp5xCtJU0qYPmJ+FTZ1jZjpzxCyBV0ww8BZm+QGijTRiHOG+s F2teuE4sRwG1LACzVhj1DGU03EWuS+jMUw== X-Received: by 2002:a67:ed93:: with SMTP id d19mr16537324vsp.60.1582181431696; Wed, 19 Feb 2020 22:50:31 -0800 (PST) Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com. [209.85.217.49]) by smtp.gmail.com with ESMTPSA id m11sm559090vkm.52.2020.02.19.22.50.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Feb 2020 22:50:30 -0800 (PST) Received: by mail-vs1-f49.google.com with SMTP id n27so2042423vsa.0 for ; Wed, 19 Feb 2020 22:50:30 -0800 (PST) X-Received: by 2002:a67:fdd3:: with SMTP id l19mr15726222vsq.42.1582181429665; Wed, 19 Feb 2020 22:50:29 -0800 (PST) MIME-Version: 1.0 References: <20200214062637.216209-1-evanbenn@chromium.org> <20200214172512.2.I7c8247c29891a538f258cb47828d58acf22c95a2@changeid> <804d3cc5-688d-7025-cb87-10b9616f4d9b@roeck-us.net> In-Reply-To: <804d3cc5-688d-7025-cb87-10b9616f4d9b@roeck-us.net> From: Evan Benn Date: Thu, 20 Feb 2020 17:50:03 +1100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] watchdog: Add new arm_smc_wdt watchdog driver To: Guenter Roeck Cc: LKML , Julius Werner , Bjorn Andersson , Mauro Carvalho Chehab , Marcin Juszkiewicz , Catalin Marinas , Olof Johansson , Leonard Crestez , Jonathan Cameron , Dinh Nguyen , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Will Deacon , linux-watchdog@vger.kernel.org, Rob Herring , Wim Van Sebroeck , =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= , Shawn Guo , "David S. Miller" , Anson Huang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > + if ((int)res->a0 == PSCI_RET_NOT_SUPPORTED) > > + return -ENOTSUPP; > > -ENODEV would be better here. > > > + if ((int)res->a0 == PSCI_RET_INVALID_PARAMS) > > + return -EINVAL; > > + if ((int)res->a0 < 0) > > + return -EIO; In fixing this I found drivers/firmware/psci/psci.c:145 Which also translates psci codes to errno codes, but uses EOPNOTSUPP: switch (errno) { case PSCI_RET_SUCCESS: return 0; case PSCI_RET_NOT_SUPPORTED: return -EOPNOTSUPP; case PSCI_RET_INVALID_PARAMS: case PSCI_RET_INVALID_ADDRESS: return -EINVAL; case PSCI_RET_DENIED: return -EPERM; }; return -EINVAL; Are these more appropriate? Evan