Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantine Shulyupin authored and Constantine Shulyupin committed Oct 5, 2019
1 parent 06a4adb commit 017c68a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
7 changes: 6 additions & 1 deletion ctracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
Dual BSD/GPL License
*/

#ifndef __cplusplus
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
#endif
#pragma GCC diagnostic ignored "-Wunused-label"

#if 0
Expand All @@ -35,6 +36,10 @@
remove:
sed -i 's-{\t_entry:;-{-' $(grep -lr $'^{\t_entry:' .)
cmake -DCMAKE_CXX_FLAGS='-DCTRACER_ON -include ctracer.h'
make CXX_FLAGS='-DCTRACER_ON -include ctracer.h' VERBOSE=1
*/

#ifndef __ASSEMBLY__
Expand Down
3 changes: 1 addition & 2 deletions dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ default values are marked with '*'\n\
Samples:\n\
\n\
TBD\n\
\n\
";
\n";

int init(int argc, char *argv[])
{
Expand Down
5 changes: 3 additions & 2 deletions ldt.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static inline u8 rx_ready(void)

static void ldt_tasklet_func(unsigned long d)
{
char data_out, data_in;
char data_out;

if (drvdata->uart_detected) {
while (tx_ready() && kfifo_out_spinlocked(&drvdata->out_fifo,
Expand All @@ -161,6 +161,7 @@ static void ldt_tasklet_func(unsigned long d)
ldt_send(data_out);
}
while (rx_ready()) {
char data_in;
data_in = ioread8(drvdata->port_ptr + UART_RX);
pr_debug("data_in=%d %c\n", data_in, data_in >= 32 ? data_in : ' ');
ldt_received(data_in);
Expand Down Expand Up @@ -201,7 +202,7 @@ static irqreturn_t ldt_isr(int irq, void *dev_id)
* timer section
*/

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)

static void ldt_timer_func(struct timer_list *ldt_timer)
{
Expand Down
6 changes: 4 additions & 2 deletions ldt_plat_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,18 @@ static __devinit int ldt_plat_probe(struct platform_device *pdev)
p = of_get_property(pdev->dev.of_node, "property", NULL);
if (p)
property = be32_to_cpu(*p);
(void)property;
}
#endif
/*
sample code for drvdata usage:
struct ldt_data *drvdata = platform_get_drvdata(pdev);
platform_set_drvdata(pdev, drvdata);
*/

(void)data;
data = dev_get_platdata(&pdev->dev);
pr_debug("%p %s\n", data, data);
(void)r;
r = platform_get_resource(pdev, IORESOURCE_IO, 0);
port = r->start;
port_size = resource_size(r);
Expand All @@ -82,7 +84,7 @@ static int __devexit ldt_plat_remove(struct platform_device *pdev)
*/

static const struct of_device_id ldt_of_match[] = {
{.compatible = "linux-driver-template",},
{.compatible = "linux-driver-template"},
{},
};

Expand Down

0 comments on commit 017c68a

Please sign in to comment.