Re: [PATCH v2 10/21] staging: rtl8192e: replace memcpy() -> ether_addr_copy_unaligned()

2015-04-14 Thread Dan Carpenter
On Mon, Apr 13, 2015 at 11:47:33PM +0200, Mateusz Kulikowski wrote:
> rtl8192e driver uses memcpy() to copy hw addresses in several places.
> checkpatch.pl suggests to use ether_addr_copy(), but most of
> addresses in driver may be unaligned.

The pointer to the struct is normally aligned (or you are in trouble
anyway and can't use it like a normal pointer).  Then you can calculate
the alignment of the struct member by looking at the struct.

BAReq->addr1 is part of struct rtllib_hdr_2addr.  It's 4 bytes into
the struct so it's fine.

I sort of like the ether_addr_copy_unaligned() macro because it would
let us silence some checkpatch false positives because otherwise people
will eventually introduce bugs like a dripping roof leak will eventually
destroy a building.  But it should be in the main kernel header with a
name like that.  And also this is misleading that we are using it for
data which is aligned.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 13/21] staging: rtl8192e: Fix PREFER_PR_LEVEL warnings

2015-04-14 Thread Dan Carpenter
On Mon, Apr 13, 2015 at 11:47:36PM +0200, Mateusz Kulikowski wrote:
> Fix most of remaining PREFER_PR_LEVEL warnings in rtllib.
> Replace printk() with pr_* where possible.
> 
> Signed-off-by: Mateusz Kulikowski 
> ---
>  drivers/staging/rtl8192e/rtllib.h|  4 +-
>  drivers/staging/rtl8192e/rtllib_crypt.c  | 17 
>  drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 59 
> +++-
>  drivers/staging/rtl8192e/rtllib_rx.c |  4 +-
>  4 files changed, 34 insertions(+), 50 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtllib.h 
> b/drivers/staging/rtl8192e/rtllib.h
> index 472e880..fd7b7a5 100644
> --- a/drivers/staging/rtl8192e/rtllib.h
> +++ b/drivers/staging/rtl8192e/rtllib.h
> @@ -685,13 +685,13 @@ extern u32 rtllib_debug_level;
>  #define RTLLIB_DEBUG(level, fmt, args...) \
>  do { \
>   if (rtllib_debug_level & (level))   \
> - printk(KERN_DEBUG "rtllib: " fmt, ## args); \
> + pr_debug("rtllib: " fmt, ## args);  \
>  } while (0)
>  
>  #define RTLLIB_DEBUG_DATA(level, data, datalen)  \
>   do {\
>   if ((rtllib_debug_level & (level)) == (level)) {\
> - printk(KERN_DEBUG "rtllib: %s()\n", __func__);  \
> + pr_debug("rtllib: %s()\n", __func__);   \
>   print_hex_dump_bytes(KERN_DEBUG, DUMP_PREFIX_NONE, \
>data, datalen); \
>   }   \

We've made it slightly more tricky to turn on these debug statements.

I don't think that's a big problem.  I don't think anyone cares about
them.  They are just noise is my guess.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 13/21] staging: rtl8192e: Fix PREFER_PR_LEVEL warnings

2015-04-14 Thread Dan Carpenter
Also these should be netdev_dbg or some crap.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 15/21] staging: rtl8192e: Fix LONG_LINE warnings - modify variables

2015-04-14 Thread Dan Carpenter
On Mon, Apr 13, 2015 at 11:47:38PM +0200, Mateusz Kulikowski wrote:
> @@ -557,43 +559,43 @@ static u8   CCKSwingTable_Ch14[CCK_Table_length][8] 
> = {
>  static void dm_tx_update_tssi_weak_signal(struct net_device *dev, u8 RF_Type)
>  {
>   struct r8192_priv *p = rtllib_priv(dev);
> + u8 *rfa_pti = &p->rfa_txpowertrackingindex;
> + u8 *rfc_pti = &p->rfc_txpowertrackingindex;
> + u8 *rfa_pti_r = &p->rfa_txpowertrackingindex_real;
> + u8 *rfc_pti_r = &p->rfc_txpowertrackingindex_real;
>  
>   if (RF_Type == RF_2T4R) {
> - if ((p->rfa_txpowertrackingindex > 0) &&
> - (p->rfc_txpowertrackingindex > 0)) {
> - p->rfa_txpowertrackingindex--;
> - if (p->rfa_txpowertrackingindex_real > 4) {
> - p->rfa_txpowertrackingindex_real--;
> + if ((*rfa_pti > 0) && (*rfc_pti > 0)) {
> + (*rfa_pti)--;
> + if (*rfa_pti_r > 4) {
> + (*rfa_pti_r)--;


Honestly, I thought that patch 14 was too hard to review and did too
many things, but this one is kind of ridiculous.

-   p->rfa_txpowertrackingindex--;
+   (*rfa_pti)--;

The new version is fewer characters but it's way more complicated to
think about.  Just rename rfa_txpowertrackingindex to something
reasonable.  It's a stupid name, because it_hasninegazillionwordsinit
and it's too long.

"rfa_pti_r" is a terrible name as well.   it_also_hngwit_for_realz.

I'm not going to review the rest of this patch.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


re: ion: add test device for unit tests to interact with dma_bufs

2015-04-14 Thread Dan Carpenter
Hello Colin Cross,

The patch ceff95d49cc3: "ion: add test device for unit tests to
interact with dma_bufs" from Dec 13, 2013, leads to the following
static checker warning:

drivers/staging/android/ion/ion_test.c:121 ion_handle_test_kernel()
warn: missing error code here? 'dma_buf_kmap()' failed. 'ret' = '0'

drivers/staging/android/ion/ion_test.c
   112  ret = dma_buf_begin_cpu_access(dma_buf, offset, size, dir);
   113  if (ret)
   114  return ret;
   115  
   116  while (copy_size > 0) {
   117  size_t to_copy;
   118  void *vaddr = dma_buf_kmap(dma_buf, page_offset);
   119  
   120  if (!vaddr)
   121  goto err;

In the ion_handle_test_dma we have equivalent code that sets err to
-ENOMEM.

   122  
   123  to_copy = min_t(size_t, PAGE_SIZE - copy_offset, 
copy_size);
   124  
   125  if (write)
   126  ret = copy_from_user(vaddr + copy_offset, ptr, 
to_copy);
   127  else
   128  ret = copy_to_user(ptr, vaddr + copy_offset, 
to_copy);
   129  
   130  dma_buf_kunmap(dma_buf, page_offset, vaddr);
   131  if (ret) {
   132  ret = -EFAULT;
   133  goto err;
   134  }
   135  
   136  copy_size -= to_copy;
   137  ptr += to_copy;
   138  page_offset++;
   139  copy_offset = 0;
   140  }
   141  err:
   142  dma_buf_end_cpu_access(dma_buf, offset, size, dir);
   143  return ret;
   144  }

regards,
dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] android: Support creating sync fence from drm fences

2015-04-14 Thread Lauri Peltonen
Modify sync_fence_create to accept a 'struct fence' instead of
'struct sync_pt'.  This will allow drm drivers to create sync_fence
objects and pass sync fd's between user space with minimal modifications,
without ever creating sync_timeline or sync_pt objects, and without
implementing the sync_timeline_ops interface.

Modify the sync driver debug code to not assume that every 'struct fence'
(that is associated with a 'struct sync_fence') is embedded within a
'struct sync_pt'.

Signed-off-by: Lauri Peltonen 
---
 drivers/staging/android/sw_sync.c|  2 +-
 drivers/staging/android/sync.c   | 10 -
 drivers/staging/android/sync.h   |  6 +++---
 drivers/staging/android/sync_debug.c | 40 
 4 files changed, 27 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/android/sw_sync.c 
b/drivers/staging/android/sw_sync.c
index c90838d36953..bec8039df6f2 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -185,7 +185,7 @@ static long sw_sync_ioctl_create_fence(struct 
sw_sync_timeline *obj,
}
 
data.name[sizeof(data.name) - 1] = '\0';
-   fence = sync_fence_create(data.name, pt);
+   fence = sync_fence_create(data.name, &pt->base);
if (fence == NULL) {
sync_pt_free(pt);
err = -ENOMEM;
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index f83e00c78051..11e6944922e0 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -187,8 +187,8 @@ static void fence_check_cb_func(struct fence *f, struct 
fence_cb *cb)
wake_up_all(&fence->wq);
 }
 
-/* TODO: implement a create which takes more that one sync_pt */
-struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt)
+/* TODO: implement a create which takes more that one pt */
+struct sync_fence *sync_fence_create(const char *name, struct fence *pt)
 {
struct sync_fence *fence;
 
@@ -199,10 +199,10 @@ struct sync_fence *sync_fence_create(const char *name, 
struct sync_pt *pt)
fence->num_fences = 1;
atomic_set(&fence->status, 1);
 
-   fence->cbs[0].sync_pt = &pt->base;
+   fence->cbs[0].sync_pt = pt;
fence->cbs[0].fence = fence;
-   if (fence_add_callback(&pt->base, &fence->cbs[0].cb,
-  fence_check_cb_func))
+   if (fence_add_callback(pt, &fence->cbs[0].cb,
+   fence_check_cb_func))
atomic_dec(&fence->status);
 
sync_fence_debug_add(fence);
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index a21b79fb4c8e..af0daa65bfa9 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -246,13 +246,13 @@ void sync_pt_free(struct sync_pt *pt);
 
 /**
  * sync_fence_create() - creates a sync fence
- * @name:  name of fence to create
- * @pt:sync_pt to add to the fence
+ * @name:  name of sync fence to create
+ * @pt:fence to add to the sync fence
  *
  * Creates a fence containg @pt.  Once this is called, the fence takes
  * ownership of @pt.
  */
-struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt);
+struct sync_fence *sync_fence_create(const char *name, struct fence *pt);
 
 /*
  * API for sync_fence consumers
diff --git a/drivers/staging/android/sync_debug.c 
b/drivers/staging/android/sync_debug.c
index 91ed2c4cff45..5e0860ebf7b5 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -82,34 +82,34 @@ static const char *sync_status_str(int status)
return "error";
 }
 
-static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence)
+static void sync_print_pt(struct seq_file *s, struct fence *pt, bool fence)
 {
int status = 1;
-   struct sync_timeline *parent = sync_pt_parent(pt);
 
-   if (fence_is_signaled_locked(&pt->base))
-   status = pt->base.status;
+   if (fence_is_signaled_locked(pt))
+   status = pt->status;
 
-   seq_printf(s, "  %s%spt %s",
-  fence ? parent->name : "",
-  fence ? "_" : "",
-  sync_status_str(status));
+   if (fence)
+   seq_printf(s, "  %d_pt %s", pt->context,
+  sync_status_str(status));
+   else
+   seq_printf(s, "  pt %s", sync_status_str(status));
 
if (status <= 0) {
struct timespec64 ts64 =
-   ktime_to_timespec64(pt->base.timestamp);
+   ktime_to_timespec64(pt->timestamp);
 
seq_printf(s, "@%lld.%09ld", (s64)ts64.tv_sec, ts64.tv_nsec);
}
 
-   if (parent->ops->timeline_value_str &&
-   parent->ops->pt_value_str) {
+   if (pt->ops->timeline_value_str &&
+   pt->ops->fence_value_str) {
char value[64];
 
-   parent-

about our SEO (search engine optimization)

2015-04-14 Thread Zach

Hey,

I was wondering if you generate any business from your website? I can help
you accomplish that if you're not already.
I specialize in the following:

-SEO (search engine optimization)
-Website Development
-Reputation management and online reviews
-Organic and Local SEO

Just reply back and I can go over options for you.

Thanks,
Zach
SEO Specialist
Contact: stor...@tom.com

-

This e-mail message and its attachments (if any) are intended solely for
the use of the addressee(s) hereof. In addition, this message and the
attachments (if any) may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If you are not
the intended recipient of this message, you are prohibited from reading,
disclosing, reproducing, distributing, disseminating or otherwise using
this transmission. Delivery of this message to any person other than the
intended recipient is not intended to waive any right or privilege. If you
have received this message in error, please promptly notify the sender and
immediately delete this message from your system.


If you don't wish our future news letter, pls send address to
desti...@aliyun.com for removal.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Business-Vorschlag

2015-04-14 Thread Dr brendan Nelson

Hallo Freund,

Ich bin Dr. Brendan Nelson Leiter Rechnungswesen Revision einer Bank aus 
London, 48 Haymarket London SW1Y 4SE Piccadilly Circus, hier in England 
(Royal Bank of Scotland). Ich schreibe Ihnen über ein Geschäft 
Vorschlag, dass der immense und des gegenseitigen Nutzens, um uns beide 
sein wird. Vielleicht interessiert es Sie, dass in meiner Abteilung 
kennen, wobei der Kopf des Rechnungsabschluss, die ich in einem Konto, 
das Sie mit einem unserer ausländischen Kunden Späte Geschäfts gehört 
entdeckte eine Summe von £ 18,5 Millionen (achtzehn Millionen 
fünfhunderttausend britische Pfund Sterling) Mogul John Lambert, ein 
Amerikaner, die ein Opfer von einem Flugzeugabsturz im Jahr 2012 war, 
ihn und seine Familie zu töten. John Lambert 44, Springfield, und Robin 
Melton, 46 von Ozark, starb, als der SR22 Cirrus 2002 stürzte in ein 
Feld nahe der Kreuzung der Landstraße 81 und Missouri 123.Also in der 
Ebene zum Zeitpunkt des Absturzes waren Lamberts drei Kinder - McKinley, 
15; und Grayson, 16, Joshua, 10; Wir bedauern den großen Verlust.


(http://www.dailymail.co.uk/news/article-2203861/Family-die-plane-crash-middle-night-business-man-father-controls.html)

Allerdings ist die Wahl der Kontaktaufnahme mit Ihnen aus der 
geographischen Natur, wo Sie leben, vor allem aufgrund der Sensibilität 
der Transaktion und die Vertraulichkeit hier geweckt. Jetzt ist unsere 
Bank gewartet hat keine der Verwandten zu kommen-up für die Behauptung, 
ohne Erfolg im Laufe des Jahres. Ich persönlich habe schon in der Suche 
die Verwandten nicht erfolgreich; Ich suche Ihre Zustimmung an Sie als 
nächsten Angehörigen / Begünstigte an den Verstorbenen zu präsentieren, 
so dass die Erlöse aus diesem Konto bei £ 18,5 Millionen britische Pfund 
Sterling geschätzt kann bezahlt / an Sie überwiesen werden, da die Namen 
nächsten Angehörigen / Begünstigten.


Dies wird ausgezahlt oder geteilt in diese Prozentsätze, 60% für mich 
und 40% zu Ihnen. Ich habe alle notwendigen rechtlichen Dokumente, die 
verwendet werden können, um diese Behauptung gesichert. Ich brauche nur 
in Ihrem Namen zu den Dokumenten füllen und legalisieren sie vor dem 
Gericht hier, um Sie als berechtigten Empfänger nachweisen. Alles, was 
ich jetzt verlangen, ist Ihre ehrliche Zusammenarbeit, Verschwiegenheit 
und Vertrauen, damit wir sehen diese Transaktion durch. Ich garantiere 
Ihnen, dass dies unter den Kreuzgängen des Gesetzes und unter einem 
gesicherten legitimen Anordnung, die Sie aus der Verletzung des Gesetzes 
zum Schutz ausgeführt.


Bitte geben Sie mir die folgende, denn wir haben sieben (7) Tagen zu 
laufen

diese durch. Das ist sehr URGENT PLEASE.

1. Vollständiger Name:
2. Ihre direkten Mobilnummer:
3. Ihre Kontakt Adresse:
4. Beruf:
5. Alter:
6. Geschlecht:
7. Nationalität:

Nachdem durch eine methodische Suche gegangen, entschied ich mich, Sie 
zu kontaktieren hoffen, dass Sie diesen Vorschlag interessant. Bitte auf 
Ihrer Bestätigung dieser Nachricht und geben Sie Ihr Interesse werde ich 
Ihnen weitere Informationen liefern. Bemühen, mich zu informieren Ihre 
Entscheidung anstatt mich warten.

Danke Ihnen im Voraus für Ihr günstiger und positive Antwort.
Freundliche Grüße,
Dr. Brendan Nelson
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH net-next] hv_netvsc: Implement partial copy into send buffer

2015-04-14 Thread David Miller
From: Haiyang Zhang 
Date: Mon, 13 Apr 2015 16:34:35 -0700

> If remaining space in a send buffer slot is too small for the whole message,
> we only copy the RNDIS header and PPI data into send buffer, so we can batch
> one more packet each time. It reduces the vmbus per-message overhead.
> 
> Signed-off-by: Haiyang Zhang 
> Reviewed-by: K. Y. Srinivasan 

Applied, thanks.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel