From: Johan Hedberg <johan.hedberg@gmail.com>
To: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Cc: linux-bluetooth@vger.kernel.org, suraj@atheros.com,
joakim.xj.ceder@stericsson.com
Subject: Re: [PATCH 4/4] Sim Access Profile dummy driver
Date: Fri, 5 Nov 2010 12:16:00 +0200 [thread overview]
Message-ID: <20101105101600.GC32149@jh-x301> (raw)
In-Reply-To: <1288791271-13857-5-git-send-email-waldemar.rymarkiewicz@tieto.com>
Hi Waldek,
On Wed, Nov 03, 2010, Waldemar Rymarkiewicz wrote:
> +static sim_connection_status_t sim_card_connection_status = SIM_DISCONNECTED;
Consider shortening these names. At least one of them (either the type
or the variable).
> +static void * sap_data = NULL; /* SAP server private data.*/
No whitespace between * and sap_data. Why is this void instead of a
specific type when its static and therefore wont be seen by other
modules?
> + if(sim_card_connection_status == SIM_MISSING)
Space before (
> + }else if(sim_card_connection_status != SIM_CONNECTED)
Space after } and before (
> + sap_power_sim_on_rsp(sap_device, SAP_RESULT_ERROR_NOT_ACCESSIBLE);
> + else {
> + sap_power_sim_on_rsp(sap_device, SAP_RESULT_ERROR_NO_REASON);
> + }
Why do you have {} for one branch but not for the other? In general
one-line branches/scopes shouldn't have braces, though the kernel coding
guideline does allow them if at least one part of the same if-else
statement has them.
> +static inline DBusMessage *invalid_args(DBusMessage *msg)
Never mind the previous comment I had about this. I checked the rest of
the tree and it seems this inline convention for D-Bus error generating
functions is quite common (though imho might not be needed at all).
> + if(sim_card_connection_status != SIM_CONNECTED)
Space before (
> +}
> +
> +
> +static GDBusMethodTable dummy_methods[] = {
Remove the other empty line.
> + { "OngoingCall", "b", "", ongoing_call},
> + { "MaxMessageSize", "u", "", max_msg_size},
> + { "Disconnect", "", "", disconnect},
> + { "CardStatus", "u", "", card_status},
> + { }
> +static GDBusSignalTable dummy_signals[] = {
> + { "","" },
> + { }
> +};
If you have no signals just pass NULL to g_dbus_register_interface
instead of declaring an (almost) empty table. Also, "" isn't a valid
value for the signal name.
Johan
next prev parent reply other threads:[~2010-11-05 10:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 13:34 [PATCH 0/4] Sim Access Profile Waldemar Rymarkiewicz
2010-11-03 13:34 ` [PATCH 1/4] Sim Access Profile API Waldemar Rymarkiewicz
2010-11-10 5:33 ` Marcel Holtmann
2010-11-10 11:12 ` Waldemar.Rymarkiewicz
2010-11-10 16:07 ` Gustavo F. Padovan
2010-11-10 21:46 ` Luiz Augusto von Dentz
2010-11-15 17:29 ` Waldemar.Rymarkiewicz
2010-11-03 13:34 ` [PATCH 2/4] Sim Access Profile Manager Waldemar Rymarkiewicz
2010-11-05 9:30 ` Johan Hedberg
2010-11-05 13:31 ` Waldemar.Rymarkiewicz
2010-11-03 13:34 ` [PATCH 3/4] Sim Access Profile Server Waldemar Rymarkiewicz
2010-11-05 10:05 ` Johan Hedberg
2010-11-05 15:12 ` Waldemar.Rymarkiewicz
2010-11-03 13:34 ` [PATCH 4/4] Sim Access Profile dummy driver Waldemar Rymarkiewicz
2010-11-05 10:16 ` Johan Hedberg [this message]
2010-11-05 15:14 ` Waldemar.Rymarkiewicz
-- strict thread matches above, loose matches on Subject: below --
2010-10-20 12:11 [PATCH 1/4] Sim Access Profile API Waldemar Rymarkiewicz
2010-10-20 12:11 ` [PATCH 4/4] Sim Access Profile dummy driver Waldemar Rymarkiewicz
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=20101105101600.GC32149@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=joakim.xj.ceder@stericsson.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=suraj@atheros.com \
--cc=waldemar.rymarkiewicz@tieto.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;
as well as URLs for NNTP newsgroup(s).