Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933914AbaFRFFU (ORCPT ); Wed, 18 Jun 2014 01:05:20 -0400 Received: from mail-qg0-f41.google.com ([209.85.192.41]:44934 "EHLO mail-qg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933822AbaFRFFP (ORCPT ); Wed, 18 Jun 2014 01:05:15 -0400 MIME-Version: 1.0 In-Reply-To: References: <1402954800-28215-1-git-send-email-dianders@chromium.org> <1402954800-28215-9-git-send-email-dianders@chromium.org> Date: Tue, 17 Jun 2014 22:05:14 -0700 X-Google-Sender-Auth: WDxor43AwdQ4nK6RTVwyQCMDKtc Message-ID: Subject: Re: [PATCH 08/10] mfd: cros_ec: cleanup: Remove EC wrapper functions From: Simon Glass To: Doug Anderson Cc: Lee Jones , Andrew Bresticker , Stephen Warren , Olof Johansson , Sonny Rao , linux-samsung-soc , Javier Martinez Canillas , Bill Richardson , Wolfram Sang , Mark Brown , Dmitry Torokhov , Samuel Ortiz , Vincent Palatin , Geert Uytterhoeven , "linux-i2c@vger.kernel.org" , lk , "linux-input@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Doug, On 17 June 2014 21:27, Doug Anderson wrote: > Simon, > > On Tue, Jun 17, 2014 at 8:42 PM, Simon Glass wrote: >>> diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c >>> index 4083796..dc37b6b 100644 >>> --- a/drivers/input/keyboard/cros_ec_keyb.c >>> +++ b/drivers/input/keyboard/cros_ec_keyb.c >>> @@ -191,8 +191,18 @@ static void cros_ec_keyb_close(struct input_dev *dev) >>> >>> static int cros_ec_keyb_get_state(struct cros_ec_keyb *ckdev, uint8_t *kb_state) >>> { >>> - return ckdev->ec->command_recv(ckdev->ec, EC_CMD_MKBP_STATE, >>> - kb_state, ckdev->cols); >>> + int ret; >>> + struct cros_ec_command msg = { >>> + .version = 0, >>> + .command = EC_CMD_MKBP_STATE, >>> + .outdata = NULL, >>> + .outsize = 0, >>> + .indata = kb_state, >>> + .insize = ckdev->cols, >>> + }; >>> + >>> + ret = ckdev->ec->cmd_xfer(ckdev->ec, &msg); >> >> Do we need ret? > > No. If you wish I will spin without it. Let me know. > > Note that locally this code includes a comment between the above and the return: > /* FIXME: This assumes msg.result == EC_RES_SUCCESS */ It's not important to me, and you've explained the other question. Reviewed-by: Simon Glass -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/