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 EFCF3C4332F for ; Tue, 22 Mar 2022 17:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239586AbiCVRZW (ORCPT ); Tue, 22 Mar 2022 13:25:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239576AbiCVRZS (ORCPT ); Tue, 22 Mar 2022 13:25:18 -0400 Received: from rosenzweig.io (rosenzweig.io [138.197.143.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF9AC2983A; Tue, 22 Mar 2022 10:23:44 -0700 (PDT) Received: by rosenzweig.io (Postfix, from userid 1000) id 54B6341E2D; Tue, 22 Mar 2022 17:23:43 +0000 (UTC) Date: Tue, 22 Mar 2022 17:23:43 +0000 From: Alyssa Rosenzweig To: Sven Peter Cc: Hector Martin , Rob Herring , Arnd Bergmann , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Marc Zyngier , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH 5/9] soc: apple: Add RTKit IPC library Message-ID: References: <20220321165049.35985-1-sven@svenpeter.dev> <20220321165049.35985-6-sven@svenpeter.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220321165049.35985-6-sven@svenpeter.dev> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +enum { APPLE_RTKIT_PWR_STATE_OFF = 0x00, > + APPLE_RTKIT_PWR_STATE_SLEEP = 0x01, > + APPLE_RTKIT_PWR_STATE_GATED = 0x02, > + APPLE_RTKIT_PWR_STATE_QUIESCED = 0x10, > + APPLE_RTKIT_PWR_STATE_ON = 0x20, > +}; It would be great to get comments added explaining what these states are. It's not obvious how off/sleep/gated/quiesced differ, and it's not obvious from the code (doesn't look like GATED is used here at all?). Are these Apple names or r/e'd names or a mix? > + if (!rtk->syslog_buffer.size) { > + rtk_warn( > + "received syslog message but syslog_buffer.size is zero"); > + goto done; > + } > + if (!rtk->syslog_buffer.buffer && !rtk->syslog_buffer.iomem) { > + rtk_warn("received syslog message but no syslog_buffer.buffer or syslog_buffer.iomem"); > + goto done; > + } Nit: Wrapping is inconsistent between these two warns. 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 77CF4C433EF for ; Tue, 22 Mar 2022 17:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BWR/Xc4HJanVIc2vfqvPOD3Lvi8zklopsM1SxrJ9r4E=; b=DogNk3eUuCuX2/ fHfJeb3z23OnnoJPcFS6QzqDV+j2ykL6m76ZwoSiyIxj2MYmKI5kNDk3lMMLTT5Svb0EjH1Zx3fh1 ilzJdJi7tihQtOcqlAhZQQAJMNjzjDKIyX7PQceCSZlZiGqREgl4iCWEZffdydKugQ2ETHuDHubko U2zAtCH8swGO7L4oawMwqiy4OP6MjXMRSahjivxC7xmAEin3W/xY5DD3L7ApjS3MvL1sw1QK6bOi1 G9CRAOfzw0yw4uZufqtFt/Nfjh3K8GFgoTzRckzP0ZmQAYml4p/lRTYesjNbS0NtaU4QF7jNzmq4a TuriHtZIzeJFlMt93olw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWiEd-00BicY-8C; Tue, 22 Mar 2022 17:23:55 +0000 Received: from rosenzweig.io ([138.197.143.207]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWiEZ-00Bib1-Pc; Tue, 22 Mar 2022 17:23:53 +0000 Received: by rosenzweig.io (Postfix, from userid 1000) id 54B6341E2D; Tue, 22 Mar 2022 17:23:43 +0000 (UTC) Date: Tue, 22 Mar 2022 17:23:43 +0000 From: Alyssa Rosenzweig To: Sven Peter Cc: Hector Martin , Rob Herring , Arnd Bergmann , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Marc Zyngier , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH 5/9] soc: apple: Add RTKit IPC library Message-ID: References: <20220321165049.35985-1-sven@svenpeter.dev> <20220321165049.35985-6-sven@svenpeter.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220321165049.35985-6-sven@svenpeter.dev> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220322_102351_948879_D5CE1D62 X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > +enum { APPLE_RTKIT_PWR_STATE_OFF = 0x00, > + APPLE_RTKIT_PWR_STATE_SLEEP = 0x01, > + APPLE_RTKIT_PWR_STATE_GATED = 0x02, > + APPLE_RTKIT_PWR_STATE_QUIESCED = 0x10, > + APPLE_RTKIT_PWR_STATE_ON = 0x20, > +}; It would be great to get comments added explaining what these states are. It's not obvious how off/sleep/gated/quiesced differ, and it's not obvious from the code (doesn't look like GATED is used here at all?). Are these Apple names or r/e'd names or a mix? > + if (!rtk->syslog_buffer.size) { > + rtk_warn( > + "received syslog message but syslog_buffer.size is zero"); > + goto done; > + } > + if (!rtk->syslog_buffer.buffer && !rtk->syslog_buffer.iomem) { > + rtk_warn("received syslog message but no syslog_buffer.buffer or syslog_buffer.iomem"); > + goto done; > + } Nit: Wrapping is inconsistent between these two warns. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel