Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3370000pxp; Mon, 14 Mar 2022 18:03:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrvou1lkJksPiwrIPIB2okI5eI2BksXYyvmhipg8xy4oJYDfO6LsBqOVW49tse7qCfAe6j X-Received: by 2002:aa7:8b14:0:b0:4f7:83b1:2e0b with SMTP id f20-20020aa78b14000000b004f783b12e0bmr22341343pfd.37.1647306206600; Mon, 14 Mar 2022 18:03:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647306206; cv=none; d=google.com; s=arc-20160816; b=hRv+0ONTZRPPd3sRY546ODtmkVqBXfVjdT+jdt1ixIs5NTeSt3YcowROr2KIu1x3qu vADvZGPIYHwGJABIiIv4Y8qJG9xZrbrxxf66KWTTocemIiJUrBC+QWWMGYfs3ewMmgOa B1wx9ZpvHxgGFEC4aOlKu2Sd9AxCfTWfy0NWd3KkgJzt3aJXMv/jOEuGy4Mt2h62bTBc TDsoIqTQwvdaTqi1cyKQc4tG35CIYTUdb/pZcQNjEtexaNkjqSX8xQ+MPc0HrapJnKq9 L275+WlOX5mwEcJU1k4Rz0rFLXLlSO4nwe1x9Ixqim0szEQGIBYNgGQ9HVrBaqOY8wxH lOEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=guV8D/zoqDzwVA8g73Md7rMeJWwPReKW2B+3M1C5VXE=; b=LPwtqEymugwRNcGqhrcgSy7+c8Y55XJy9X6PNutvjBIU3meelyoEWYUISZNGVyqmPR n5g+JM/YMFV+zKYYos0rUUQtLgjAGykLkRrWlQX2TH4bC1y1+bgzhLH/mLmLFdRLnn/k 9AUOYgV0LVtBHpQxbsamVam8Tb48eUEhAIb/Bqh9TPyCYaI8rN+DF71HXlpcsvrA//B8 uRqJb4BTOclStoxLloEiJHfUvZlyaWdmSiOwZhCGrJsGUZHjZiz9KnCjYpaYNe0UHxqo shUVlQD5zIIjL16/mTdNphdEJg+MYwVmAYexPdlwN9gfwjXR0fCnS/tpNCSkW2Ih6IBL EnfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=wlKFXKXx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 24-20020a631358000000b003809d3f64afsi16152381pgt.525.2022.03.14.18.03.12; Mon, 14 Mar 2022 18:03:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=wlKFXKXx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243684AbiCNSRU (ORCPT + 99 others); Mon, 14 Mar 2022 14:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238339AbiCNSRS (ORCPT ); Mon, 14 Mar 2022 14:17:18 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD3D33CFC7; Mon, 14 Mar 2022 11:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1647281763; x=1678817763; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=guV8D/zoqDzwVA8g73Md7rMeJWwPReKW2B+3M1C5VXE=; b=wlKFXKXxL5r2UcmPxyQ2KDsckMs9SKrEAQtValA0MPPjJ08RlOZtxbh1 XbWd9l1AHTR087Zpb0xbdzVSV7pGNfmZBJzcIq7YjEk7f1AlTxIpwM3IK fSySkc4SWS5gw/s/viQk2JThR1R6cCTh6RuCt2gNDPsN9tEyMER3lcHcB Q=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-01.qualcomm.com with ESMTP; 14 Mar 2022 11:16:02 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2022 11:16:01 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 14 Mar 2022 11:16:01 -0700 Received: from [10.110.69.79] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 14 Mar 2022 11:16:00 -0700 Message-ID: <7cd9301f-f417-e555-6025-74acfc53598a@quicinc.com> Date: Mon, 14 Mar 2022 11:15:52 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH v6 1/4] ipmi: ssif_bmc: Add SSIF BMC driver Content-Language: en-US To: Quan Nguyen , Corey Minyard , Rob Herring , Krzysztof Kozlowski , Joel Stanley , "Andrew Jeffery" , Brendan Higgins , Benjamin Herrenschmidt , Wolfram Sang , , , , , , , CC: Open Source Submission , "Thang Q . Nguyen" , Phong Vo References: <20220310114119.13736-1-quan@os.amperecomputing.com> <20220310114119.13736-2-quan@os.amperecomputing.com> From: Jae Hyun Yoo In-Reply-To: <20220310114119.13736-2-quan@os.amperecomputing.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Quan, [...] > +static void on_read_requested_event(struct ssif_bmc_ctx *ssif_bmc, u8 *val) > +{ > + if (ssif_bmc->state == SSIF_READY || > + ssif_bmc->state == SSIF_START || > + ssif_bmc->state == SSIF_REQ_RECVING || > + ssif_bmc->state == SSIF_RES_SENDING) { > + ssif_bmc->state = SSIF_BAD_SMBUS; > + dev_warn(&ssif_bmc->client->dev, > + "Warn: %s unexpected READ REQUESTED in state=%s\n", > + __func__, state_to_string(ssif_bmc->state)); It will print out that the case happens in SSIF_BAD_SMBUS state always because ssif_bmc->state is already assigned as SSIF_BAD_SMBUS above. Move the assignment to after the dev_warn printing. [...] > +static const struct of_device_id ssif_bmc_match[] = { > + { .compatible = "ampere,ssif-bmc" }, Does this driver have any Ampere specific handling? If not, it could be "ssif-bmc" as a generic SSIF driver. > + { }, > +}; Add 'MODULE_DEVICE_TABLE(of, ssif_bmc_match);' > + > +static const struct i2c_device_id ssif_bmc_id[] = { > + { DEVICE_NAME, 0 }, > + { }, > +}; > + Remove this blank line. > +MODULE_DEVICE_TABLE(i2c, ssif_bmc_id); > + > +static struct i2c_driver ssif_bmc_driver = { > + .driver = { > + .name = DEVICE_NAME, > + .of_match_table = ssif_bmc_match, > + }, > + .probe = ssif_bmc_probe, > + .remove = ssif_bmc_remove, > + .id_table = ssif_bmc_id, > +}; > + Remove this blank line too. -Jae > +module_i2c_driver(ssif_bmc_driver); > + > +MODULE_AUTHOR("Quan Nguyen "); > +MODULE_AUTHOR("Chuong Tran "); > +MODULE_DESCRIPTION("Linux device driver of the BMC IPMI SSIF interface."); > +MODULE_LICENSE("GPL"); [...]