From: Joe Perches <joe@perches.com>
To: Taku Izumi <izumi.taku@jp.fujitsu.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
platform-driver-x86@vger.kernel.org, dvhart@infradead.org,
rkhan@redhat.com, alexander.h.duyck@redhat.com,
linux-acpi@vger.kernel.org, sergei.shtylyov@cogentembedded.com,
stephen@networkplumber.org, yasu.isimatu@gmail.com
Subject: Re: [PATCH v2 01/22] fjes: Introduce FUJITSU Extended Socket Network Device driver
Date: Tue, 23 Jun 2015 23:50:37 -0700 [thread overview]
Message-ID: <1435128637.2504.51.camel@perches.com> (raw)
In-Reply-To: <1435114554-7151-2-git-send-email-izumi.taku@jp.fujitsu.com>
On Wed, 2015-06-24 at 11:55 +0900, Taku Izumi wrote:
> This patch adds the basic code of FUJITSU Extended Socket
> Network Device driver.
trivial notes:
> diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
[]
> +static int fjes_acpi_add(struct acpi_device *device)
> +{
[]
> + result =
> + utf16s_to_utf8s((wchar_t *)str->string.pointer,
> + str->string.length, UTF16_LITTLE_ENDIAN,
> + str_buf, sizeof(str_buf) - 1);
I dislike this style as it's not normally used in the kernel.
Most would use another tab indent on the utf16s_to_utf8s line
if the line didn't fit, but this would is more common:
result = utf16s_to_utf8s((wchar_t *)str->string.pointer,
str->string.length, UTF16_LITTLE_ENDIAN,
str_buf, sizeof(str_buf) - 1);
>
> + /* create platform_device */
> + plat_dev =
> + platform_device_register_simple(DRV_NAME, 0, fjes_resource,
> + ARRAY_SIZE(fjes_resource));
plat_dev = platform_device_register_simple(DRV_NAME, 0, fjes_resource,
ARRAY_SIZE(fjes_resource));
etc...
> +static acpi_status
> +fjes_get_acpi_resource(struct acpi_resource *acpi_res, void *data)
> +{
> + struct resource *res = data;
> + struct acpi_resource_address32 *addr;
> + struct acpi_resource_irq *irq;
> +
> + switch (acpi_res->type) {
> + case ACPI_RESOURCE_TYPE_ADDRESS32:
> + addr = &acpi_res->data.address32;
> + res[0].start = addr->address.minimum;
> + res[0].end = addr->address.minimum +
> + addr->address.address_length - 1;
> + break;
> +
> + case ACPI_RESOURCE_TYPE_IRQ:
> + irq = &acpi_res->data.irq;
> + if (irq->interrupt_count != 1)
> + return AE_ERROR;
> + res[1].start = irq->interrupts[0];
> + res[1].end = irq->interrupts[0];
> + break;
> +
> + default:
> + break;
> + }
> +
> + return AE_OK;
> +}
Is this function used in this compilation?
If not, it's odd to add code that isn't used.
Is it better to make the 2nd argument a
struct resource * rather than a void * ?
next prev parent reply other threads:[~2015-06-24 6:50 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-24 2:52 [PATCH v2 00/22] FUJITSU Extended Socket network device driver Taku Izumi
2015-06-24 2:55 ` [PATCH v2 01/22] fjes: Introduce FUJITSU Extended Socket Network Device driver Taku Izumi
2015-06-24 6:50 ` Joe Perches [this message]
2015-06-25 0:32 ` Izumi, Taku
2015-06-24 2:55 ` [PATCH v2 02/22] fjes: Hardware initialization routine Taku Izumi
2015-07-07 16:38 ` Yasuaki Ishimatsu
2015-06-24 2:55 ` [PATCH v2 03/22] fjes: Hardware cleanup routine Taku Izumi
2015-06-24 2:55 ` [PATCH v2 04/22] fjes: platform_driver's .probe and .remove routine Taku Izumi
2015-06-24 2:55 ` [PATCH v2 05/22] fjes: ES information acquisition routine Taku Izumi
2015-06-24 2:55 ` [PATCH v2 06/22] fjes: buffer address regist/unregistration routine Taku Izumi
2015-07-06 19:35 ` Yasuaki Ishimatsu
2015-07-07 18:35 ` Yasuaki Ishimatsu
2015-06-24 2:55 ` [PATCH v2 07/22] fjes: net_device_ops.ndo_open and .ndo_stop Taku Izumi
2015-06-24 2:55 ` [PATCH v2 08/22] fjes: net_device_ops.ndo_start_xmit Taku Izumi
2015-07-10 19:21 ` Yasuaki Ishimatsu
2015-06-24 2:55 ` [PATCH v2 09/22] fjes: raise_intr_rxdata_task Taku Izumi
2015-06-24 2:55 ` [PATCH v2 10/22] fjes: tx_stall_task Taku Izumi
2015-07-13 16:03 ` Yasuaki Ishimatsu
2015-06-24 2:55 ` [PATCH v2 11/22] fjes: NAPI polling function Taku Izumi
2015-06-24 2:55 ` [PATCH v2 12/22] fjes: net_device_ops.ndo_get_stats64 Taku Izumi
2015-06-24 2:55 ` [PATCH v2 13/22] fjes: net_device_ops.ndo_change_mtu Taku Izumi
2015-06-24 2:55 ` [PATCH v2 14/22] fjes: net_device_ops.ndo_tx_timeout Taku Izumi
2015-06-24 2:55 ` [PATCH v2 15/22] fjes: net_device_ops.ndo_vlan_rx_add/kill_vid Taku Izumi
2015-07-13 16:54 ` Yasuaki Ishimatsu
2015-06-24 2:55 ` [PATCH v2 16/22] fjes: interrupt_watch_task Taku Izumi
2015-06-24 2:55 ` [PATCH v2 17/22] fjes: force_close_task Taku Izumi
2015-06-24 2:55 ` [PATCH v2 18/22] fjes: unshare_watch_task Taku Izumi
2015-07-13 18:35 ` Yasuaki Ishimatsu
2015-06-24 2:55 ` [PATCH v2 19/22] fjes: update_zone_task Taku Izumi
2015-06-24 2:55 ` [PATCH v2 20/22] fjes: epstop_task Taku Izumi
2015-06-24 2:55 ` [PATCH v2 21/22] fjes: handle receive cancellation request interrupt Taku Izumi
2015-06-24 2:55 ` [PATCH v2 22/22] fjes: ethtool support Taku Izumi
2015-06-24 13:41 ` [PATCH v2 00/22] FUJITSU Extended Socket network device driver Jesper Dangaard Brouer
2015-06-25 0:32 ` Izumi, Taku
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435128637.2504.51.camel@perches.com \
--to=joe@perches.com \
--cc=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=dvhart@infradead.org \
--cc=izumi.taku@jp.fujitsu.com \
--cc=linux-acpi@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rkhan@redhat.com \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=stephen@networkplumber.org \
--cc=yasu.isimatu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox