From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756186AbcBPVyA (ORCPT ); Tue, 16 Feb 2016 16:54:00 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:34539 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755413AbcBPVx7 (ORCPT ); Tue, 16 Feb 2016 16:53:59 -0500 Date: Tue, 16 Feb 2016 22:53:54 +0100 From: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= To: Pali =?utf-8?B?Um9ow6Fy?= Cc: Matthew Garrett , Darren Hart , Darek Stojaczyk , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/5] dell-wmi: enable receiving WMI events on Dell Vostro V131 Message-ID: <20160216215354.GA2741@eudyptula.hq.kempniu.pl> References: <20160121090401.GR7192@pali> <1455634230-1487-1-git-send-email-kernel@kempniu.pl> <1455634230-1487-4-git-send-email-kernel@kempniu.pl> <20160216151739.GK1476@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160216151739.GK1476@pali> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > static void __exit dell_wmi_exit(void) > > { > > + struct calling_interface_buffer *buffer; > > + > > + if (wmi_requires_smbios_request) { > > + buffer = dell_smbios_get_buffer(); > > + buffer->input[0] = 0x10000; > > + buffer->input[1] = 0x51534554; > > + dell_smbios_send_request(17, 3); > > + dell_smbios_release_buffer(); > > + } > > + > > wmi_remove_notify_handler(DELL_EVENT_GUID); > > dell_wmi_input_destroy(); > > } > > Hi! I would propose moving this get_buffer, send, release code into own > function with boolean argument on/off. This de-duplicate same code plus > decrease level of indentation in _init function. And maybe adding ascii > string comment representation for that 0x5153... number can be useful. Ah, yes, sure. I will do that in v4. -- Best regards, Michał Kępień